diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-08-02 06:22:47 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-08-02 06:22:47 +0200 |
| commit | 9cdca1884057b58962fd58880f01c824aca24536 (patch) | |
| tree | 54b407caf7ddce93d9b2b75c7b4b6b37b7097180 /compiler/rustc_codegen_gcc/example/alloc_system.rs | |
| parent | aa8462b6df138d18a82e3a54d47f3b00bf01c7f4 (diff) | |
| parent | 66d23793f08cef2360bde6afd23e6badaed5cc2f (diff) | |
| download | rust-9cdca1884057b58962fd58880f01c824aca24536.tar.gz rust-9cdca1884057b58962fd58880f01c824aca24536.zip | |
Rollup merge of #114178 - estebank:let-binding-macro, r=petrochenkov
Account for macros when suggesting a new let binding Provide a structured suggestion when the expression comes from a macro expansion: ``` error[E0716]: temporary value dropped while borrowed --> $DIR/borrowck-let-suggestion.rs:2:17 | LL | let mut x = vec![1].iter(); | ^^^^^^^ - temporary value is freed at the end of this statement | | | creates a temporary value which is freed while still in use LL | LL | x.use_mut(); | - borrow later used here | = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info) help: consider using a `let` binding to create a longer lived value | LL ~ let binding = vec![1]; LL ~ let mut x = binding.iter(); | ```
Diffstat (limited to 'compiler/rustc_codegen_gcc/example/alloc_system.rs')
0 files changed, 0 insertions, 0 deletions
