-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #112575 - matthiaskrgr:rollup-7a8d7tg, r=matthiaskrgr
Rollup of 2 pull requests Successful merges: - #111885 (Don't ICE on unsized `extern "rust-call"` call) - #112558 (Fix typo in mod.rs) r? `@ghost` `@rustbot` modify labels: rollup
- Loading branch information
Showing
6 changed files
with
41 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#![feature(unsized_tuple_coercion)] | ||
#![feature(unboxed_closures)] | ||
#![feature(unsized_fn_params)] | ||
|
||
fn bad() -> extern "rust-call" fn(([u8],)) { todo!() } | ||
|
||
fn main() { | ||
let f = bad(); | ||
let slice: Box<([u8],)> = Box::new(([1; 8],)); | ||
f(*slice); | ||
//~^ ERROR the size for values of type `[u8]` cannot be known at compilation time | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
error[E0277]: the size for values of type `[u8]` cannot be known at compilation time | ||
--> $DIR/rust-call.rs:10:7 | ||
| | ||
LL | f(*slice); | ||
| ^^^^^^ doesn't have a size known at compile-time | ||
| | ||
= help: within `([u8],)`, the trait `Sized` is not implemented for `[u8]` | ||
= note: required because it appears within the type `([u8],)` | ||
= note: argument required to be sized due to `extern "rust-call"` ABI | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0277`. |