-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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 #106529 - Dylan-DPC:rollup-mvncmrk, r=Dylan-DPC
Rollup of 5 pull requests Successful merges: - #106400 (Point at expressions where inference refines an unexpected type) - #106491 (Fix error-index redirect to work with the back button.) - #106494 (Add regression test for #58355) - #106499 (fix [type error] for error E0029 and E0277) - #106502 (rustdoc: remove legacy user-select CSS) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
- Loading branch information
Showing
24 changed files
with
515 additions
and
24 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
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,7 @@ | ||
#![crate_type = "lib"] | ||
|
||
pub fn foo(callback: fn() -> dyn ToString) { | ||
let mut x: Option<Box<dyn Fn() -> dyn ToString>> = None; | ||
x = Some(Box::new(callback)); | ||
//~^ ERROR: the size for values of type `dyn ToString` 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 `dyn ToString` cannot be known at compilation time | ||
--> $DIR/issue-58355.rs:5:14 | ||
| | ||
LL | x = Some(Box::new(callback)); | ||
| ^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time | ||
| | ||
= help: within `fn() -> dyn ToString`, the trait `Sized` is not implemented for `dyn ToString` | ||
= note: required because it appears within the type `fn() -> dyn ToString` | ||
= note: required for the cast from `fn() -> dyn ToString` to the object type `dyn Fn() -> (dyn ToString + 'static)` | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0277`. |
Oops, something went wrong.