mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-08-31 15:47:31 +00:00
user facing code should use not use PostAnalysis
This commit is contained in:
parent
a905e3b21b
commit
1d4f709e60
2 changed files with 2 additions and 2 deletions
|
@ -87,7 +87,7 @@ fn existing_from_impl(
|
||||||
let from_trait = FamousDefs(sema, krate).core_convert_From()?;
|
let from_trait = FamousDefs(sema, krate).core_convert_From()?;
|
||||||
let interner = DbInterner::new_with(db, Some(krate.base()), None);
|
let interner = DbInterner::new_with(db, Some(krate.base()), None);
|
||||||
use hir::next_solver::infer::DbInternerInferExt;
|
use hir::next_solver::infer::DbInternerInferExt;
|
||||||
let infcx = interner.infer_ctxt().build(TypingMode::PostAnalysis);
|
let infcx = interner.infer_ctxt().build(TypingMode::non_body_analysis());
|
||||||
|
|
||||||
let variant = variant.instantiate_infer(&infcx);
|
let variant = variant.instantiate_infer(&infcx);
|
||||||
let enum_ = variant.parent_enum(sema.db);
|
let enum_ = variant.parent_enum(sema.db);
|
||||||
|
|
|
@ -216,7 +216,7 @@ fn from_impl_exists(
|
||||||
let from_trait = FamousDefs(sema, krate).core_convert_From()?;
|
let from_trait = FamousDefs(sema, krate).core_convert_From()?;
|
||||||
let interner = DbInterner::new_with(db, Some(krate.base()), None);
|
let interner = DbInterner::new_with(db, Some(krate.base()), None);
|
||||||
use hir::next_solver::infer::DbInternerInferExt;
|
use hir::next_solver::infer::DbInternerInferExt;
|
||||||
let infcx = interner.infer_ctxt().build(TypingMode::PostAnalysis);
|
let infcx = interner.infer_ctxt().build(TypingMode::non_body_analysis());
|
||||||
|
|
||||||
let strukt = strukt.instantiate_infer(&infcx);
|
let strukt = strukt.instantiate_infer(&infcx);
|
||||||
let field_ty = strukt.fields(db).get(main_field_i)?.ty(db);
|
let field_ty = strukt.fields(db).get(main_field_i)?.ty(db);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue