rust/compiler/rustc_resolve/src
Matthias Krüger 174bbfb369
Rollup merge of #137686 - nbdd0121:asm_const, r=compiler-errors
Handle asm const similar to inline const

Previously, asm consts are handled similar to anon consts rather than inline consts. Anon consts are not good at dealing with lifetimes, because `type_of` has lifetimes erased already. Inline consts can deal with lifetimes because they live in an outer typeck context. And since `global_asm!` lacks an outer typeck context, we have implemented asm consts with anon consts while they're in fact more similar to inline consts.

This was changed in #137180, and this means that handling asm consts as inline consts are possible. While as `@compiler-errors` pointed out, `const` currently can't be used with any types with lifetime, this is about to change if #128464 is implemented. This PR is a preparatory PR for that feature.

As an unintentional side effect, fix #117877.

cc `@Amanieu`
r? `@compiler-errors`
2025-03-01 05:49:52 +01:00
..
late Fix binding mode problems 2025-02-22 00:13:19 +00:00
build_reduced_graph.rs convert all_macro_rules from hashmap to hashset 2025-02-21 15:29:17 +03:00
check_unused.rs Run clippy --fix for unnecessary_map_or lint 2025-01-19 19:15:00 +00:00
def_collector.rs Handle asm const similar to inline const 2025-02-26 19:27:19 +00:00
diagnostics.rs Rollup merge of #137529 - klensy:unused3, r=lcnr 2025-02-26 04:15:04 +01:00
effective_visibilities.rs rustc_resolve: reduce rightwards drift with let..else 👉💨 2025-01-21 13:42:32 +00:00
errors.rs Use identifiers in diagnostics more often 2025-01-27 01:23:34 +00:00
ident.rs Rustfmt 2025-02-08 22:12:13 +00:00
imports.rs Rollup merge of #137529 - klensy:unused3, r=lcnr 2025-02-26 04:15:04 +01:00
late.rs Teach structured errors to display short Ty 2025-02-25 16:56:03 +00:00
lib.rs stabilize extract_if 2025-02-23 21:11:12 +07:00
macros.rs Introduce new-style attribute parsers for several attributes 2025-02-24 14:31:17 +01:00
rustdoc.rs rustdoc: improve refdef handling in the unresolved link lint 2025-02-15 12:21:35 -07:00