Commit graph

29 commits

Author SHA1 Message Date
bors
c524c7dd25 Auto merge of #98588 - b-naber:valtrees-cleanup, r=lcnr
Use only ty::Unevaluated<'tcx, ()> in type system

r? `@lcnr`
2022-09-17 03:04:22 +00:00
Camille GILLOT
1f370d9437 Use tcx.hir() utils for spans in MIR building.
This corrects the `span_with_body` in the case of closures, which was
incorrectly shortened to the `def_span`.
2022-09-13 19:18:23 +02:00
b-naber
29c0364c37 rebase 2022-09-13 17:48:05 +02:00
Nilstrieb
5d7ce21b6b bless mir-opt tests 2022-08-22 15:19:40 +02:00
Nilstrieb
11c0280798 bless mir opt tests 2022-07-28 14:24:44 +02:00
Ralf Jung
4e7aaf1f44 tweak names and output and bless 2022-07-09 07:43:56 -04:00
Camille GILLOT
42e4eee893 Shorten def_span for more items. 2022-07-01 17:39:19 +02:00
lcnr
ee0b56483f change mir::Constant in mir dumps 2022-02-22 09:38:07 +01:00
Mark Rousskov
9f76214854 Revert "Auto merge of #93800 - b-naber:static-initializers-mir-val, r=oli-obk"
This reverts commit a240ccd81c, reversing
changes made to 393fdc1048.

This PR was likely responsible for a relatively large regression in
dist-x86_64-msvc-alt builder times, from approximately 1.7 to 2.8 hours,
bringing that builder into the pool of the slowest builders we currently have.

This seems to be limited to the alt builder due to needing parallel-compiler
enabled, likely leading to slow LLVM compilation for some reason.
2022-02-20 21:56:20 -05:00
b-naber
54ff25e446 bless mir-opt tests 2022-02-15 21:17:49 +01:00
b-naber
8092b90cb2 bless tests 2022-02-15 21:16:30 +01:00
The 8472
8985e5ee82 Override rustc version in ui and mir-opt tests to get stable hashes
Building a dozen separate regexps for each test in compiletest consumes significant amounts of CPU cycles.
Using `RUSTC_FORCE_INCR_COMP_ARTIFACT_HEADER` stabilizes hashes calcuated for the individual tests so
no test-dependent normalization is needed. Hashes for the standard library still change so some
normalizations are still needed.
2022-01-21 00:28:07 +01:00
Ellen
71bbb603f4 initial revert 2022-01-15 01:16:55 +00:00
pierwill
7d7dfba350 Include rustc version in rustc_span::StableCrateId
Normalize symbol hashes in compiletest.

Remove DefId sorting
2021-12-13 10:24:05 -06:00
Aaron Hill
4d66986e09
Use larger span for adjustments on method calls
Currently, we use a relatively 'small' span for THIR
expressions generated by an 'adjustment' (e.g. an autoderef,
autoborrow, unsizing). As a result, if a borrow generated
by an adustment ends up causing a borrowcheck error, for example:

```rust
let mut my_var = String::new();
let my_ref = &my_var
my_var.push('a');
my_ref;
```

then the span for the mutable borrow may end up referring
to only the base expression (e.g. `my_var`), rather than
the method call which triggered the mutable borrow
(e.g. `my_var.push('a')`)

Due to a quirk of the MIR borrowck implementation,
this doesn't always get exposed in migration mode,
but it does in many cases.

This commit makes THIR building consistently use 'larger'
spans for adjustment expressions

The intent of this change it make it clearer to users
when it's the specific way in which a variable is
used (for example, in a method call) that produdes
a borrowcheck error. For example, an error message
claiming that a 'mutable borrow occurs here' might
be confusing if it just points at a usage of a variable
(e.g. `my_var`), when no `&mut` is in sight. Pointing
at the entire expression should help to emphasize
that the method call itself is responsible for
the mutable borrow.

In several cases, this makes the `#![feature(nll)]` diagnostic
output match up exactly with the default (migration mode) output.
As a result, several `.nll.stderr` files end up getting removed
entirely.
2021-09-25 10:00:41 -05:00
lcnr
5ba8f4d258 update mir diffs 2021-08-26 11:00:30 +02:00
Ralf Jung
1f21ab114e bless mir-opt, codegen, and remaining ui tests 2021-07-14 18:17:49 +02:00
bjorn3
e95bd03f01 Revert "Revert "Update mir opt tests""
This reverts commit 8d5fb5bf7d.
2021-07-06 11:28:06 +02:00
bjorn3
8d5fb5bf7d Revert "Update mir opt tests"
This reverts commit e0e0cfa649.
2021-06-07 10:25:32 +02:00
bjorn3
e0e0cfa649 Update mir opt tests 2021-05-30 12:51:36 +02:00
Oli Scherer
1d56b8a2bc Make unevaluated DefId rendering deterministic 2021-03-31 09:13:45 +00:00
lcnr
2885ca3cce bless mir-opt tests 2021-03-20 17:22:24 +01:00
oli
84fe7cf24e Also generate StorageDead in constants 2020-12-09 10:59:10 +00:00
Ralf Jung
153e843c49 fix Rvalue::ty for ThreadLocalRef 2020-10-19 11:44:28 +02:00
Aaron Hill
33337bb855
Bless mir-opt tests 2020-10-04 07:54:02 -04:00
marmeladema
f1878d19fa Move from {{closure}}#0 syntax to {closure#0} for (def) path components 2020-09-25 22:46:14 +01:00
Lzu Tao
c4c017a184 Suppress "const" prefix of FnDef in MIR dump 2020-08-21 00:36:49 +00:00
Lzu Tao
633a2e31ef Suppress MIR comments for FnDef in ty::Const 2020-08-20 09:27:33 +00:00
Xavier Denis
f07607f47a Move mir-opt tests to toplevel 2020-07-29 17:36:03 +02:00
Renamed from src/test/mir-opt/const-promotion-extern-static/const_promotion_extern_static.FOO.PromoteTemps.diff (Browse further)