forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
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 rust-lang#128863 - matthiaskrgr:rollup-wmp8znk, r=matth…
…iaskrgr Rollup of 4 pull requests Successful merges: - rust-lang#128616 (Don't inline tainted MIR bodies) - rust-lang#128804 (run-make: enable msvc for redundant-libs) - rust-lang#128823 (run-make: enable msvc for staticlib-dylib-linkage) - rust-lang#128824 (Update compiler-builtins version to 0.1.118) Failed merges: - rust-lang#128410 (Migrate `remap-path-prefix-dwarf` `run-make` test to rmake) r? `@ghost` `@rustbot` modify labels: rollup
- Loading branch information
Showing
11 changed files
with
64 additions
and
27 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,8 @@ | ||
void foo1() {} | ||
void foo2() {} | ||
#ifdef _MSC_VER | ||
#define DllExport __declspec(dllexport) | ||
#else | ||
#define DllExport | ||
#endif | ||
|
||
DllExport void foo1() {} | ||
DllExport void foo2() {} |
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
10 changes: 8 additions & 2 deletions
10
tests/crashes/122909.rs → ...i/polymorphization/inline-tainted-body.rs
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 |
---|---|---|
@@ -1,15 +1,21 @@ | ||
//@ compile-flags: -Zvalidate-mir -Zinline-mir=yes | ||
//@ known-bug: #122909 | ||
|
||
#![feature(unboxed_closures)] | ||
|
||
use std::sync::{Arc, Context, Weak}; | ||
use std::sync::Arc; | ||
|
||
pub struct WeakOnce<T>(); | ||
//~^ ERROR type parameter `T` is never used | ||
|
||
impl<T> WeakOnce<T> { | ||
extern "rust-call" fn try_get(&self) -> Option<Arc<T>> {} | ||
//~^ ERROR functions with the "rust-call" ABI must take a single non-self tuple argument | ||
//~| ERROR mismatched types | ||
|
||
pub fn get(&self) -> Arc<T> { | ||
self.try_get() | ||
.unwrap_or_else(|| panic!("Singleton {} not available", std::any::type_name::<T>())) | ||
} | ||
} | ||
|
||
fn main() {} |
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,30 @@ | ||
error[E0392]: type parameter `T` is never used | ||
--> $DIR/inline-tainted-body.rs:7:21 | ||
| | ||
LL | pub struct WeakOnce<T>(); | ||
| ^ unused type parameter | ||
| | ||
= help: consider removing `T`, referring to it in a field, or using a marker such as `PhantomData` | ||
= help: if you intended `T` to be a const parameter, use `const T: /* Type */` instead | ||
|
||
error: functions with the "rust-call" ABI must take a single non-self tuple argument | ||
--> $DIR/inline-tainted-body.rs:11:35 | ||
| | ||
LL | extern "rust-call" fn try_get(&self) -> Option<Arc<T>> {} | ||
| ^^^^^ | ||
|
||
error[E0308]: mismatched types | ||
--> $DIR/inline-tainted-body.rs:11:45 | ||
| | ||
LL | extern "rust-call" fn try_get(&self) -> Option<Arc<T>> {} | ||
| ------- ^^^^^^^^^^^^^^ expected `Option<Arc<T>>`, found `()` | ||
| | | ||
| implicitly returns `()` as its body has no tail or `return` expression | ||
| | ||
= note: expected enum `Option<Arc<T>>` | ||
found unit type `()` | ||
|
||
error: aborting due to 3 previous errors | ||
|
||
Some errors have detailed explanations: E0308, E0392. | ||
For more information about an error, try `rustc --explain E0308`. |