Auto merge of #16807 - lnicola:sync-from-rust3, r=lnicola

minor: sync last two releases from downstream

Turns out I made quite a mess on the last two syncs, and this PR is a mess too, but I hope it's fine.
This commit is contained in:
bors 2024-03-11 07:41:25 +00:00
commit 0931361b8f
6 changed files with 9 additions and 11 deletions

View File

@ -742,9 +742,8 @@ pub(crate) fn adt_datum_query(
phantom_data,
};
#[cfg(FALSE)]
// this slows down rust-analyzer by quite a bit unfortunately, so enabling this is currently not worth it
let variant_id_to_fields = |id: VariantId| {
let _variant_id_to_fields = |id: VariantId| {
let variant_data = &id.variant_data(db.upcast());
let fields = if variant_data.fields().is_empty() {
vec![]

View File

@ -1,6 +1,6 @@
//! Interpret intrinsics, lang items and `extern "C"` wellknown functions which their implementation
//! is not available.
//!
use std::cmp;
use chalk_ir::TyKind;

View File

@ -51,5 +51,8 @@ expect-test = "1.4.0"
test-utils.workspace = true
test-fixture.workspace = true
[features]
in-rust-tree = []
[lints]
workspace = true

View File

@ -419,14 +419,10 @@ fn expand(
#[cfg(test)]
mod tests {
use ide_db::base_db::SourceDatabase;
use vfs::file_set::FileSetConfigBuilder;
use super::*;
use ide_db::base_db::SourceRootId;
use vfs::{file_set::FileSetConfigBuilder, VfsPath};
use crate::SourceRootConfig;
#[test]
fn test_loading_rust_analyzer() {
let path = Path::new(env!("CARGO_MANIFEST_DIR")).parent().unwrap().parent().unwrap();

View File

@ -10,16 +10,16 @@
ops::{Bound, Range},
};
use ::tt::{TextRange, TextSize};
use proc_macro::bridge::{self, server};
use span::{Span, FIXUP_ERASED_FILE_AST_ID_MARKER};
use tt::{TextRange, TextSize};
use crate::server::{
delim_to_external, delim_to_internal, literal_with_stringify_parts,
token_stream::TokenStreamBuilder, Symbol, SymbolInternerRef, SYMBOL_INTERNER,
};
mod tt {
pub use ::tt::*;
pub use tt::*;
pub type Subtree = ::tt::Subtree<super::Span>;
pub type TokenTree = ::tt::TokenTree<super::Span>;

View File

@ -14,7 +14,7 @@
mod tt {
pub use proc_macro_api::msg::TokenId;
pub use ::tt::*;
pub use tt::*;
pub type Subtree = ::tt::Subtree<TokenId>;
pub type TokenTree = ::tt::TokenTree<TokenId>;