Skip to content

Commit 8e18cd6

Browse files
authored
Merge pull request rust-lang#19559 from ChayimFriedman2/rust-186
internal: Switch to Rust 1.86.0
2 parents a7cdc0b + c7202e8 commit 8e18cd6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+1010
-1258
lines changed

src/tools/rust-analyzer/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ exclude = ["crates/proc-macro-srv/proc-macro-test/imp"]
44
resolver = "2"
55

66
[workspace.package]
7-
rust-version = "1.85"
7+
rust-version = "1.86"
88
edition = "2024"
99
license = "MIT OR Apache-2.0"
1010
authors = ["rust-analyzer team"]

src/tools/rust-analyzer/crates/base-db/src/lib.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,6 @@ macro_rules! impl_intern_key {
4343
};
4444
}
4545

46-
pub trait Upcast<T: ?Sized> {
47-
fn upcast(&self) -> &T;
48-
}
49-
5046
pub const DEFAULT_FILE_TEXT_LRU_CAP: u16 = 16;
5147
pub const DEFAULT_PARSE_LRU_CAP: u16 = 128;
5248
pub const DEFAULT_BORROWCK_LRU_CAP: u16 = 2024;

src/tools/rust-analyzer/crates/hir-def/src/attr.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ impl Attrs {
4646
}
4747

4848
pub(crate) fn filter(db: &dyn DefDatabase, krate: Crate, raw_attrs: RawAttrs) -> Attrs {
49-
Attrs(raw_attrs.filter(db.upcast(), krate))
49+
Attrs(raw_attrs.filter(db, krate))
5050
}
5151
}
5252

@@ -507,7 +507,7 @@ impl AttrsWithOwner {
507507
// FIXME: We should be never getting `None` here.
508508
match src.value.get(it.local_id()) {
509509
Some(val) => RawAttrs::from_attrs_owner(
510-
db.upcast(),
510+
db,
511511
src.with_value(val),
512512
db.span_map(src.file_id).as_ref(),
513513
),
@@ -519,7 +519,7 @@ impl AttrsWithOwner {
519519
// FIXME: We should be never getting `None` here.
520520
match src.value.get(it.local_id()) {
521521
Some(val) => RawAttrs::from_attrs_owner(
522-
db.upcast(),
522+
db,
523523
src.with_value(val),
524524
db.span_map(src.file_id).as_ref(),
525525
),
@@ -531,7 +531,7 @@ impl AttrsWithOwner {
531531
// FIXME: We should be never getting `None` here.
532532
match src.value.get(it.local_id) {
533533
Some(val) => RawAttrs::from_attrs_owner(
534-
db.upcast(),
534+
db,
535535
src.with_value(val),
536536
db.span_map(src.file_id).as_ref(),
537537
),
@@ -544,7 +544,7 @@ impl AttrsWithOwner {
544544
AttrDefId::UseId(it) => attrs_from_item_tree_loc(db, it),
545545
};
546546

547-
let attrs = raw_attrs.filter(db.upcast(), def.krate(db));
547+
let attrs = raw_attrs.filter(db, def.krate(db));
548548
Attrs(attrs)
549549
}
550550

src/tools/rust-analyzer/crates/hir-def/src/db.rs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//! Defines database & queries for name resolution.
2-
use base_db::{Crate, RootQueryDb, SourceDatabase, Upcast};
2+
use base_db::{Crate, RootQueryDb, SourceDatabase};
33
use either::Either;
44
use hir_expand::{HirFileId, MacroDefId, db::ExpandDatabase};
55
use intern::sym;
@@ -100,13 +100,7 @@ pub trait InternDatabase: RootQueryDb {
100100
}
101101

102102
#[query_group::query_group]
103-
pub trait DefDatabase:
104-
InternDatabase
105-
+ ExpandDatabase
106-
+ SourceDatabase
107-
+ Upcast<dyn ExpandDatabase>
108-
+ Upcast<dyn RootQueryDb>
109-
{
103+
pub trait DefDatabase: InternDatabase + ExpandDatabase + SourceDatabase {
110104
/// Whether to expand procedural macros during name resolution.
111105
#[salsa::input]
112106
fn expand_proc_attr_macros(&self) -> bool;
@@ -381,7 +375,7 @@ fn include_macro_invoc(
381375
.flat_map(|m| m.scope.iter_macro_invoc())
382376
.filter_map(|invoc| {
383377
db.lookup_intern_macro_call(*invoc.1)
384-
.include_file_id(db.upcast(), *invoc.1)
378+
.include_file_id(db, *invoc.1)
385379
.map(|x| (*invoc.1, x))
386380
})
387381
.collect()

src/tools/rust-analyzer/crates/hir-def/src/expr_store/expander.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ impl Expander {
7272
krate: Crate,
7373
has_attrs: &dyn HasAttrs,
7474
) -> Attrs {
75-
Attrs::filter(db, krate, RawAttrs::new(db.upcast(), has_attrs, self.span_map.as_ref()))
75+
Attrs::filter(db, krate, RawAttrs::new(db, has_attrs, self.span_map.as_ref()))
7676
}
7777

7878
pub(super) fn is_cfg_enabled(
@@ -103,7 +103,7 @@ impl Expander {
103103
let result = self.within_limit(db, |this| {
104104
let macro_call = this.in_file(&macro_call);
105105
match macro_call.as_call_id_with_errors(
106-
db.upcast(),
106+
db,
107107
krate,
108108
|path| resolver(path).map(|it| db.macro_def(it)),
109109
eager_callback,
@@ -178,7 +178,7 @@ impl Expander {
178178
self.recursion_depth = u32::MAX;
179179
cov_mark::hit!(your_stack_belongs_to_me);
180180
return ExpandResult::only_err(ExpandError::new(
181-
db.macro_arg_considering_derives(call_id, &call_id.lookup(db.upcast()).kind).2,
181+
db.macro_arg_considering_derives(call_id, &call_id.lookup(db).kind).2,
182182
ExpandErrorKind::RecursionOverflow,
183183
));
184184
}

src/tools/rust-analyzer/crates/hir-def/src/expr_store/lower/path.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ pub(super) fn lower_path(
7878
return None;
7979
}
8080
break kind = resolve_crate_root(
81-
collector.db.upcast(),
81+
collector.db,
8282
collector.expander.ctx_for_range(name_ref.syntax().text_range()),
8383
)
8484
.map(PathKind::DollarCrate)
@@ -216,7 +216,7 @@ pub(super) fn lower_path(
216216
let syn_ctxt = collector.expander.ctx_for_range(path.segment()?.syntax().text_range());
217217
if let Some(macro_call_id) = syn_ctxt.outer_expn(collector.db) {
218218
if collector.db.lookup_intern_macro_call(macro_call_id).def.local_inner {
219-
kind = match resolve_crate_root(collector.db.upcast(), syn_ctxt) {
219+
kind = match resolve_crate_root(collector.db, syn_ctxt) {
220220
Some(crate_root) => PathKind::DollarCrate(crate_root),
221221
None => PathKind::Crate,
222222
}

0 commit comments

Comments
 (0)