Auto merge of #86502 - JohnTitor:rollup-wge0f3x, r=JohnTitor
Rollup of 8 pull requests Successful merges: - #83739 (Account for bad placeholder errors on consts/statics with trait objects) - #85637 (document PartialEq, PartialOrd, Ord requirements more explicitly) - #86152 (Lazify is_really_default condition in the RustdocGUI bootstrap step) - #86156 (Fix a bug in the linkchecker) - #86427 (Updated release note) - #86452 (fix panic-safety in specialized Zip::next_back) - #86484 (Do not set depth to 0 in fully_expand_fragment) - #86491 (expand: Move some more derive logic to rustc_builtin_macros) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This commit is contained in:
commit
6a540bd40c
26 changed files with 291 additions and 107 deletions
|
|
@ -2,5 +2,4 @@ fn foo() -> _ { 5 } //~ ERROR E0121
|
|||
|
||||
static BAR: _ = "test"; //~ ERROR E0121
|
||||
|
||||
fn main() {
|
||||
}
|
||||
fn main() {}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,16 @@
|
|||
// Regression test for #84632: Recursion limit is ignored
|
||||
// for builtin macros that eagerly expands.
|
||||
|
||||
#![recursion_limit = "15"]
|
||||
macro_rules! a {
|
||||
() => ("");
|
||||
(A) => (concat!("", a!()));
|
||||
(A, $($A:ident),*) => (concat!("", a!($($A),*)))
|
||||
//~^ ERROR recursion limit reached
|
||||
//~| HELP consider adding
|
||||
}
|
||||
|
||||
fn main() {
|
||||
a!(A, A, A, A, A);
|
||||
a!(A, A, A, A, A, A, A, A, A, A, A);
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
error: recursion limit reached while expanding `concat!`
|
||||
--> $DIR/issue-84632-eager-expansion-recursion-limit.rs:8:28
|
||||
|
|
||||
LL | (A, $($A:ident),*) => (concat!("", a!($($A),*)))
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
...
|
||||
LL | a!(A, A, A, A, A, A, A, A, A, A, A);
|
||||
| ------------------------------------ in this macro invocation
|
||||
|
|
||||
= help: consider adding a `#![recursion_limit="30"]` attribute to your crate (`issue_84632_eager_expansion_recursion_limit`)
|
||||
= note: this error originates in the macro `a` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
6
src/test/ui/typeck/issue-75889.rs
Normal file
6
src/test/ui/typeck/issue-75889.rs
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
// Regression test for #75889.
|
||||
|
||||
const FOO: dyn Fn() -> _ = ""; //~ ERROR E0121
|
||||
static BOO: dyn Fn() -> _ = ""; //~ ERROR E0121
|
||||
|
||||
fn main() {}
|
||||
15
src/test/ui/typeck/issue-75889.stderr
Normal file
15
src/test/ui/typeck/issue-75889.stderr
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
|
||||
--> $DIR/issue-75889.rs:3:24
|
||||
|
|
||||
LL | const FOO: dyn Fn() -> _ = "";
|
||||
| ^ not allowed in type signatures
|
||||
|
||||
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
|
||||
--> $DIR/issue-75889.rs:4:25
|
||||
|
|
||||
LL | static BOO: dyn Fn() -> _ = "";
|
||||
| ^ not allowed in type signatures
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0121`.
|
||||
Loading…
Add table
Add a link
Reference in a new issue