Auto merge of #95999 - Dylan-DPC:rollup-k2r3k11, r=Dylan-DPC
Rollup of 4 pull requests Successful merges: - #95441 (Always use system `python3` on MacOS) - #95954 (Fix broken link in coverage tools docs) - #95984 (Fix spelling in docs for `can_not_overflow`) - #95989 (diagnostics: regression test for spurrious "help: store this in the heap") Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This commit is contained in:
commit
b768f248e9
8 changed files with 44 additions and 12 deletions
|
@ -999,7 +999,7 @@ macro_rules! impl_helper_for {
|
|||
}
|
||||
impl_helper_for! { i8 i16 i32 i64 i128 isize u8 u16 u32 u64 u128 usize }
|
||||
|
||||
/// Determins if a string of text of that length of that radix could be guaranteed to be
|
||||
/// Determines if a string of text of that length of that radix could be guaranteed to be
|
||||
/// stored in the given type T.
|
||||
/// Note that if the radix is known to the compiler, it is just the check of digits.len that
|
||||
/// is done at runtime.
|
||||
|
|
|
@ -1176,7 +1176,17 @@ impl Build {
|
|||
|
||||
/// Path to the python interpreter to use
|
||||
fn python(&self) -> &Path {
|
||||
self.config.python.as_ref().unwrap()
|
||||
if self.config.build.ends_with("apple-darwin") {
|
||||
// Force /usr/bin/python3 on macOS for LLDB tests because we're loading the
|
||||
// LLDB plugin's compiled module which only works with the system python
|
||||
// (namely not Homebrew-installed python)
|
||||
Path::new("/usr/bin/python3")
|
||||
} else {
|
||||
self.config
|
||||
.python
|
||||
.as_ref()
|
||||
.expect("python is required for running LLDB or rustdoc tests")
|
||||
}
|
||||
}
|
||||
|
||||
/// Temporary directory that extended error information is emitted to.
|
||||
|
|
|
@ -103,7 +103,9 @@ pub fn check(build: &mut Build) {
|
|||
.take()
|
||||
.map(|p| cmd_finder.must_have(p))
|
||||
.or_else(|| env::var_os("BOOTSTRAP_PYTHON").map(PathBuf::from)) // set by bootstrap.py
|
||||
.or_else(|| Some(cmd_finder.must_have("python")));
|
||||
.or_else(|| cmd_finder.maybe_have("python"))
|
||||
.or_else(|| cmd_finder.maybe_have("python3"))
|
||||
.or_else(|| cmd_finder.maybe_have("python2"));
|
||||
|
||||
build.config.nodejs = build
|
||||
.config
|
||||
|
|
|
@ -1402,14 +1402,7 @@ note: if you're sure you want to do this, please open an issue as to why. In the
|
|||
|
||||
cmd.arg("--docck-python").arg(builder.python());
|
||||
|
||||
if builder.config.build.ends_with("apple-darwin") {
|
||||
// Force /usr/bin/python3 on macOS for LLDB tests because we're loading the
|
||||
// LLDB plugin's compiled module which only works with the system python
|
||||
// (namely not Homebrew-installed python)
|
||||
cmd.arg("--lldb-python").arg("/usr/bin/python3");
|
||||
} else {
|
||||
cmd.arg("--lldb-python").arg(builder.python());
|
||||
}
|
||||
cmd.arg("--lldb-python").arg(builder.python());
|
||||
|
||||
if let Some(ref gdb) = builder.config.gdb {
|
||||
cmd.arg("--gdb").arg(gdb);
|
||||
|
|
Before Width: | Height: | Size: 407 KiB After Width: | Height: | Size: 407 KiB |
|
@ -145,7 +145,7 @@ $ llvm-cov show -Xdemangler=rustfilt target/debug/examples/formatjson5 \
|
|||
-name=add_quoted_string
|
||||
```
|
||||
|
||||
<img alt="Screenshot of sample `llvm-cov show` result, for function add_quoted_string" src="img/llvm-cov-show-01.png" class="center"/>
|
||||
<img alt="Screenshot of sample `llvm-cov show` result, for function add_quoted_string" src="images/llvm-cov-show-01.png" class="center"/>
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
|
|
15
src/test/ui/box/issue-82446.rs
Normal file
15
src/test/ui/box/issue-82446.rs
Normal file
|
@ -0,0 +1,15 @@
|
|||
// https://github.com/rust-lang/rust/issues/82446
|
||||
// Spurious 'help: store this in the heap' regression test
|
||||
trait MyTrait {}
|
||||
|
||||
struct Foo {
|
||||
val: Box<dyn MyTrait>
|
||||
}
|
||||
|
||||
fn make_it(val: &Box<dyn MyTrait>) {
|
||||
Foo {
|
||||
val //~ ERROR [E0308]
|
||||
};
|
||||
}
|
||||
|
||||
fn main() {}
|
12
src/test/ui/box/issue-82446.stderr
Normal file
12
src/test/ui/box/issue-82446.stderr
Normal file
|
@ -0,0 +1,12 @@
|
|||
error[E0308]: mismatched types
|
||||
--> $DIR/issue-82446.rs:11:9
|
||||
|
|
||||
LL | val
|
||||
| ^^^ expected struct `Box`, found reference
|
||||
|
|
||||
= note: expected struct `Box<(dyn MyTrait + 'static)>`
|
||||
found reference `&Box<(dyn MyTrait + 'static)>`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0308`.
|
Loading…
Add table
Reference in a new issue