about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-03-11 07:41:25 +0000
committerbors <bors@rust-lang.org>2024-03-11 07:41:25 +0000
commit0931361b8f6e3d02efb638cd9964c8817f59210a (patch)
tree59fde84e5fb6ee696596a59fbdd253c23140e2c9
parent574e23ec508064613783cba3d1833a95fd9a5080 (diff)
parentf65fe4e281e73543e8bc2f9ced06648ce209c074 (diff)
downloadrust-0931361b8f6e3d02efb638cd9964c8817f59210a.tar.gz
rust-0931361b8f6e3d02efb638cd9964c8817f59210a.zip
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.
-rw-r--r--crates/hir-ty/src/chalk_db.rs3
-rw-r--r--crates/hir-ty/src/mir/eval/shim.rs2
-rw-r--r--crates/ide/Cargo.toml3
-rw-r--r--crates/load-cargo/src/lib.rs6
-rw-r--r--crates/proc-macro-srv/src/server/rust_analyzer_span.rs4
-rw-r--r--crates/proc-macro-srv/src/server/token_id.rs2
6 files changed, 9 insertions, 11 deletions
diff --git a/crates/hir-ty/src/chalk_db.rs b/crates/hir-ty/src/chalk_db.rs
index 40a195f7d95..e678a2fee13 100644
--- a/crates/hir-ty/src/chalk_db.rs
+++ b/crates/hir-ty/src/chalk_db.rs
@@ -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![]
diff --git a/crates/hir-ty/src/mir/eval/shim.rs b/crates/hir-ty/src/mir/eval/shim.rs
index cd992d07602..628a1fe2d28 100644
--- a/crates/hir-ty/src/mir/eval/shim.rs
+++ b/crates/hir-ty/src/mir/eval/shim.rs
@@ -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;
diff --git a/crates/ide/Cargo.toml b/crates/ide/Cargo.toml
index 006fd222c61..aca7d613e11 100644
--- a/crates/ide/Cargo.toml
+++ b/crates/ide/Cargo.toml
@@ -51,5 +51,8 @@ expect-test = "1.4.0"
 test-utils.workspace = true
 test-fixture.workspace = true
 
+[features]
+in-rust-tree = []
+
 [lints]
 workspace = true
diff --git a/crates/load-cargo/src/lib.rs b/crates/load-cargo/src/lib.rs
index a1c089520da..f9a0e547271 100644
--- a/crates/load-cargo/src/lib.rs
+++ b/crates/load-cargo/src/lib.rs
@@ -419,14 +419,10 @@ impl ProcMacroExpander for Expander {
 #[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();
diff --git a/crates/proc-macro-srv/src/server/rust_analyzer_span.rs b/crates/proc-macro-srv/src/server/rust_analyzer_span.rs
index 4d2ee36cc8e..0350bde4122 100644
--- a/crates/proc-macro-srv/src/server/rust_analyzer_span.rs
+++ b/crates/proc-macro-srv/src/server/rust_analyzer_span.rs
@@ -10,16 +10,16 @@ use std::{
     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>;
diff --git a/crates/proc-macro-srv/src/server/token_id.rs b/crates/proc-macro-srv/src/server/token_id.rs
index 7fbddfc375d..ad7bd954cf1 100644
--- a/crates/proc-macro-srv/src/server/token_id.rs
+++ b/crates/proc-macro-srv/src/server/token_id.rs
@@ -14,7 +14,7 @@ use crate::server::{
 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>;