rustc_resolve: improve const generic errors#152913
rustc_resolve: improve const generic errors#152913Unique-Usman wants to merge 1 commit intorust-lang:mainfrom
Conversation
|
rustbot has assigned @JonathanBrouwer. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
r? @estebank |
00fa325 to
98d6219
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
98d6219 to
b162b4b
Compare
| .struct_constructors | ||
| .insert(local_def_id, (ctor_res, ctor_vis.to_def_id(), ret_fields)); | ||
| } | ||
| self.r.struct_generics.insert(local_def_id, generics.clone()); |
There was a problem hiding this comment.
Let's see if we can struct_generics store references. That should keep mem usage to a minimum.
| if let Some(const_err) = const_err { | ||
| err.cancel(); | ||
| err = const_err; | ||
| } |
There was a problem hiding this comment.
This is currently inactive, right? const_err isn't None anywhere right now?
There was a problem hiding this comment.
const_err is actually always None except in the case of where we add the error we just introduce see it here -> https://github.com/rust-lang/rust/pull/152913/changes#diff-2c81e6d8048a31a3ce43f30181aaa037e0ad0076e7aee67792ca993f28c75ac3R3440-R3441
There was a problem hiding this comment.
it is to prevent the type error from showing up.
|
HIR ty lowering was modified cc @fmease |
This comment has been minimized.
This comment has been minimized.
b162b4b to
42de5af
Compare
This comment has been minimized.
This comment has been minimized.
Signed-off-by: Usman Akinyemi <usmanakinyemi202@gmail.com>
42de5af to
aa46052
Compare
No description provided.