Skip to content

Rollup of 12 pull requests #69986

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 43 commits into from
Mar 13, 2020
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
79b8ad8
Implement `Copy` for `IoSlice`
LeSeulArtichaut Feb 23, 2020
9fa7981
rustdoc: don't call into_iter() on iterator. (clippy::identity_conver…
matthiaskrgr Mar 5, 2020
6bfff8a
rustdoc: Use .any(p) instead of find(p).is_some(). (clippy::search_is…
matthiaskrgr Mar 5, 2020
7aad89a
Use ?-operator in more places (clippy::question_mark, had some false …
matthiaskrgr Mar 5, 2020
45108b1
rustdoc: simplify boolean condition (clippy::nonminimal_bool)
matthiaskrgr Mar 6, 2020
1351db3
iterate over a maps values directly. (clippy::for_kv_map)
matthiaskrgr Mar 6, 2020
254ceae
call .as_deref() instead of .as_ref().map(Deref::deref) (clippy::opti…
matthiaskrgr Mar 6, 2020
0d7faaf
rustdoc: remove redundant static lifetimes (clippy::redundant_static_…
matthiaskrgr Mar 6, 2020
cca3d52
libtest: declare variables as floats instead of casting them (clippy:…
matthiaskrgr Mar 6, 2020
77af19e
remove unneeded mutable references (cippy::unnecessary_mut_passed)
matthiaskrgr Mar 6, 2020
f326f0f
libtest: remove redundant argument to writeln!() (clippy::writeln_emp…
matthiaskrgr Mar 6, 2020
3f87f8c
Use writeln!(fmt, "word") instead of write!(fmt, "word\n") (clippy::w…
matthiaskrgr Mar 6, 2020
8351138
reduce references on match patterns (clippy::match_ref_pats)
matthiaskrgr Mar 7, 2020
611cfd5
Clean up E0423 explanation
GuillaumeGomez Mar 12, 2020
118003d
triagebot.toml: add ping aliases
Centril Mar 12, 2020
7326e53
Move some const-eval `build-pass` tests to `check-pass`
LeSeulArtichaut Mar 12, 2020
8f0fa24
Move some more tests to `check-pass`
LeSeulArtichaut Mar 12, 2020
90e8058
triagebot.toml: add typo aliases
Centril Mar 12, 2020
f32cccc
rename panic_if_ intrinsics to assert_
RalfJung Mar 12, 2020
7b1b08c
remove lifetimes that can be elided (clippy::needless_lifetimes)
matthiaskrgr Mar 6, 2020
e9c9657
miri engine: fix treatment of abort intrinsic
RalfJung Mar 12, 2020
081e32b
Add test for issue-58490
JohnTitor Mar 13, 2020
0efc2cf
Add test for issue-60390
JohnTitor Mar 13, 2020
a2c41e9
Add test for issue-62504
JohnTitor Mar 13, 2020
3609bac
Add test for issue-67739
JohnTitor Mar 13, 2020
7c987eb
Add test for issue-69092
JohnTitor Mar 13, 2020
f61fb53
adjust enum naming
RalfJung Mar 13, 2020
13ea774
bless tests
RalfJung Mar 13, 2020
08a7fa6
update stable-since version for const_int_conversion
tspiteri Mar 13, 2020
a36bf9c
Clean up E0434 explanation
GuillaumeGomez Mar 13, 2020
87f8ee6
Add documentation for pub keyword
sjud Mar 5, 2020
5d90154
Rollup merge of #69403 - LeSeulArtichaut:copy-ioslice, r=sfackler
JohnTitor Mar 13, 2020
913a933
Rollup merge of #69460 - LeSeulArtichaut:move-compile-pass, r=RalfJung
JohnTitor Mar 13, 2020
35df9cc
Rollup merge of #69723 - sjud:sjud-doc-request, r=Mark-Simulacrum
JohnTitor Mar 13, 2020
8e17c83
Rollup merge of #69802 - matthiaskrgr:cl1ppy, r=Dylan-DPC
JohnTitor Mar 13, 2020
c13548d
Rollup merge of #69809 - matthiaskrgr:lifetimes, r=eddyb
JohnTitor Mar 13, 2020
78d722f
Rollup merge of #69947 - GuillaumeGomez:cleanup-e0423, r=Dylan-DPC
JohnTitor Mar 13, 2020
995e584
Rollup merge of #69949 - rust-lang:triagebot-ping-alias, r=Mark-Simul…
JohnTitor Mar 13, 2020
77263db
Rollup merge of #69954 - RalfJung:panic_if-assert, r=Centril,eddyb
JohnTitor Mar 13, 2020
f2af2cf
Rollup merge of #69960 - RalfJung:abort, r=oli-obk
JohnTitor Mar 13, 2020
93da9d7
Rollup merge of #69966 - JohnTitor:more-more-tests, r=Centril
JohnTitor Mar 13, 2020
b0d1fc5
Rollup merge of #69973 - tspiteri:const-int-conversion-since, r=dtolnay
JohnTitor Mar 13, 2020
1d8f5f0
Rollup merge of #69974 - GuillaumeGomez:cleanup-e0434, r=Dylan-DPC
JohnTitor Mar 13, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/test/ui/asm/issue-69092.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// build-fail
// ignore-emscripten no asm! support
// Regression test for #69092

#![feature(asm)]

fn main() {
unsafe { asm!(".ascii \"Xen\0\""); }
//~^ ERROR: <inline asm>:1:9: error: expected string in '.ascii' directive
}
11 changes: 11 additions & 0 deletions src/test/ui/asm/issue-69092.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
error: <inline asm>:1:9: error: expected string in '.ascii' directive
.ascii "Xen
^

--> $DIR/issue-69092.rs:8:14
|
LL | unsafe { asm!(".ascii \"Xen\0\""); }
| ^^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to previous error

25 changes: 25 additions & 0 deletions src/test/ui/const-generics/issues/issue-62504.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// Regression test for #62504

#![feature(const_generics)]
#![allow(incomplete_features)]

trait HasSize {
const SIZE: usize;
}

impl<const X: usize> HasSize for ArrayHolder<{ X }> {
const SIZE: usize = X;
}

struct ArrayHolder<const X: usize>([u32; X]);

impl<const X: usize> ArrayHolder<{ X }> {
pub const fn new() -> Self {
ArrayHolder([0; Self::SIZE])
//~^ ERROR: array lengths can't depend on generic parameters
}
}

fn main() {
let mut array = ArrayHolder::new();
}
8 changes: 8 additions & 0 deletions src/test/ui/const-generics/issues/issue-62504.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
error: array lengths can't depend on generic parameters
--> $DIR/issue-62504.rs:18:25
|
LL | ArrayHolder([0; Self::SIZE])
| ^^^^^^^^^^

error: aborting due to previous error

18 changes: 18 additions & 0 deletions src/test/ui/const-generics/issues/issue-67739.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// Regression test for #67739

#![allow(incomplete_features)]
#![feature(const_generics)]

use std::mem;

pub trait Trait {
type Associated: Sized;

fn associated_size(&self) -> usize {
[0u8; mem::size_of::<Self::Associated>()];
//~^ ERROR: array lengths can't depend on generic parameters
0
}
}

fn main() {}
8 changes: 8 additions & 0 deletions src/test/ui/const-generics/issues/issue-67739.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
error: array lengths can't depend on generic parameters
--> $DIR/issue-67739.rs:12:15
|
LL | [0u8; mem::size_of::<Self::Associated>()];
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to previous error

26 changes: 26 additions & 0 deletions src/test/ui/macros/issue-58490.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// Regression test for #58490

macro_rules! a {
( @1 $i:item ) => {
a! { @2 $i }
};
( @2 $i:item ) => {
$i
};
}
mod b {
a! {
@1
#[macro_export]
macro_rules! b { () => () }
}
#[macro_export]
macro_rules! b { () => () }
//~^ ERROR: the name `b` is defined multiple times
}
mod c {
#[allow(unused_imports)]
use crate::b;
}

fn main() {}
14 changes: 14 additions & 0 deletions src/test/ui/macros/issue-58490.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
error[E0428]: the name `b` is defined multiple times
--> $DIR/issue-58490.rs:18:5
|
LL | macro_rules! b { () => () }
| -------------- previous definition of the macro `b` here
...
LL | macro_rules! b { () => () }
| ^^^^^^^^^^^^^^ `b` redefined here
|
= note: `b` must be defined only once in the macro namespace of this module

error: aborting due to previous error

For more information about this error, try `rustc --explain E0428`.
8 changes: 8 additions & 0 deletions src/test/ui/mir/issue-60390.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// check-pass
// compile-flags: --emit=mir,link
// Regression test for #60390, this ICE requires `--emit=mir` flag.

fn main() {
enum Inner { Member(u32) };
Inner::Member(0);
}