Auto merge of #74667 - Manishearth:rollup-s6k59sw, r=Manishearth
Rollup of 8 pull requests Successful merges: - #74141 (libstd/libcore: fix various typos) - #74490 (add a Backtrace::disabled function) - #74548 (one more Path::with_extension example, to demonstrate behavior) - #74587 (Prefer constant over function) - #74606 (Remove Linux workarounds for missing CLOEXEC support) - #74637 (Make str point to primitive page) - #74654 (require type defaults to be after const generic parameters) - #74659 (Improve codegen for unchecked float casts on wasm) Failed merges: r? @ghost
This commit is contained in:
commit
2bbfa02b1b
36 changed files with 266 additions and 302 deletions
8
src/test/ui/const-generics/defaults/wrong-order.rs
Normal file
8
src/test/ui/const-generics/defaults/wrong-order.rs
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
#![feature(const_generics)] //~ WARN the feature `const_generics` is incomplete
|
||||
|
||||
struct A<T = u32, const N: usize> {
|
||||
//~^ ERROR type parameters with a default must be trailing
|
||||
arg: T,
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
19
src/test/ui/const-generics/defaults/wrong-order.stderr
Normal file
19
src/test/ui/const-generics/defaults/wrong-order.stderr
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
error: type parameters with a default must be trailing
|
||||
--> $DIR/wrong-order.rs:3:10
|
||||
|
|
||||
LL | struct A<T = u32, const N: usize> {
|
||||
| ^
|
||||
|
|
||||
= note: using type defaults and const parameters in the same parameter list is currently not permitted
|
||||
|
||||
warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes
|
||||
--> $DIR/wrong-order.rs:1:12
|
||||
|
|
||||
LL | #![feature(const_generics)]
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: `#[warn(incomplete_features)]` on by default
|
||||
= note: see issue #44580 <https://github.com/rust-lang/rust/issues/44580> for more information
|
||||
|
||||
error: aborting due to previous error; 1 warning emitted
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue