about summary refs log tree commit diff
path: root/compiler/rustc_interface/src
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-03-10 22:16:43 +0100
committerGitHub <noreply@github.com>2024-03-10 22:16:43 +0100
commit9ccbbda6ac3c56c0d3390afd8101ab5c4cda2019 (patch)
tree6e1b95c926ab12de130a3857743df6b1496f9b76 /compiler/rustc_interface/src
parentb02f2a0e76f46f7ed244a686c4909635495ee254 (diff)
parent7d99e80c55486780b59c3b947b20e72344a3bdb2 (diff)
downloadrust-9ccbbda6ac3c56c0d3390afd8101ab5c4cda2019.tar.gz
rust-9ccbbda6ac3c56c0d3390afd8101ab5c4cda2019.zip
Rollup merge of #122290 - RalfJung:mir-printing, r=compiler-errors
MIR printing: print the path of uneval'd const

Currently it just prints `const _` which makes it impossible to say which constant is being referred to.

Also refer to promoteds in a consistent way; previously MIR printing would do
```
promoted[0] in C1: &Option<Cell<i32>> = {
    // ...
}
```
Now that should be
```
const C1::promoted[0]: &Option<Cell<i32>> = {
    // ...
}
```

We don't seem to have a test for that so I tried it by hand, it seems to work:
```
const main::promoted[12]: &[&str; 3] = {
    let mut _0: &[&str; 3];
    let mut _1: [&str; 3];
    let mut _2: &str;
    let mut _3: &str;
    let mut _4: &str;
    let mut _5: &str;

    bb0: {
        _3 = const "b";
        _2 = &(*_3);
        _5 = const "c";
        _4 = &(*_5);
        _1 = [const "a", move _2, move _4];
        _0 = &_1;
        return;
    }
}
```
Diffstat (limited to 'compiler/rustc_interface/src')
0 files changed, 0 insertions, 0 deletions