3

Directly use ConstValue for single literals in blocks by b-naber · Pull Request...

 2 years ago
source link: https://github.com/rust-lang/rust/pull/92780
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Copy link

Contributor

b-naber commented 18 days ago

Addresses the minimal repro in #92186, but doesn't fix the underlying problem (which would be solved by solving the anon subst problem afaict).

I do, however, think that it makes sense in general to treat single literals in anon blocks as const values directly, especially in light of the problem that the issue refers to (anon const evaluation being postponed until infer variables in substs can be resolved, which was introduced by #90023), i.e. while we do get warnings for those unnecessary braces, we should try to avoid errors caused by those braces if possible.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK