about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-12-19 17:14:12 +0000
committerbors <bors@rust-lang.org>2021-12-19 17:14:12 +0000
commite95e084a14870a718c712936ab5a8f8cd0159485 (patch)
tree6186457f6f9a872bdd22a7e8ec56288a7aef36a1 /src
parent41c3017c82bbc16842cc3bc1afa904e6910e293c (diff)
parent9415c67ae55d6da8640303776e96b68b79c3a0d0 (diff)
downloadrust-e95e084a14870a718c712936ab5a8f8cd0159485.tar.gz
rust-e95e084a14870a718c712936ab5a8f8cd0159485.zip
Auto merge of #92106 - matthiaskrgr:rollup-zw6t1mu, r=matthiaskrgr
Rollup of 4 pull requests

Successful merges:

 - #91791 (Fix an ICE when lowering a float with missing exponent magnitude)
 - #91878 (Remove `in_band_lifetimes` from `rustc_infer`)
 - #91895 (Remove `in_band_lifetimes` for `rustc_monomorphize`)
 - #92029 (Explicitly set no ELF flags for .rustc section)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'src')
-rw-r--r--src/test/ui/consts/issue-91434.rs6
-rw-r--r--src/test/ui/consts/issue-91434.stderr23
2 files changed, 29 insertions, 0 deletions
diff --git a/src/test/ui/consts/issue-91434.rs b/src/test/ui/consts/issue-91434.rs
new file mode 100644
index 00000000000..fc7731291b3
--- /dev/null
+++ b/src/test/ui/consts/issue-91434.rs
@@ -0,0 +1,6 @@
+fn main() {
+    [9; [[9E; h]]];
+    //~^ ERROR: expected at least one digit in exponent
+    //~| ERROR: cannot find value `h` in this scope [E0425]
+    //~| ERROR: constant expression depends on a generic parameter
+}
diff --git a/src/test/ui/consts/issue-91434.stderr b/src/test/ui/consts/issue-91434.stderr
new file mode 100644
index 00000000000..9d3fe5f2016
--- /dev/null
+++ b/src/test/ui/consts/issue-91434.stderr
@@ -0,0 +1,23 @@
+error: expected at least one digit in exponent
+  --> $DIR/issue-91434.rs:2:11
+   |
+LL |     [9; [[9E; h]]];
+   |           ^^
+
+error[E0425]: cannot find value `h` in this scope
+  --> $DIR/issue-91434.rs:2:15
+   |
+LL |     [9; [[9E; h]]];
+   |               ^ not found in this scope
+
+error: constant expression depends on a generic parameter
+  --> $DIR/issue-91434.rs:2:9
+   |
+LL |     [9; [[9E; h]]];
+   |         ^^^^^^^^^
+   |
+   = note: this may fail depending on what value the parameter takes
+
+error: aborting due to 3 previous errors
+
+For more information about this error, try `rustc --explain E0425`.