8000 Rollup of 13 pull requests by Centril · Pull Request #65368 · rust-lang/rust · GitHub
[go: up one dir, main page]

Skip to content

Rollup of 13 pull requests #65368

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 33 commits into from
Oct 13, 2019
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
334bafe
Document current deny by default lints
197g Oct 3, 2019
4bb1592
Suggest `if let` on `let` refutable binding
estebank Oct 9, 2019
5bb0a03
Move diagnostics code out of the critical path
estebank Oct 11, 2019
91cf02c
Implement Clone::clone_from for VecDeque
crgl Oct 3, 2019
10671f1
Add tests for VecDeque clone_from
crgl Oct 3, 2019
d21eeb1
Override nth for VecDeque Iter and IterMut
crgl Oct 4, 2019
7140c02
resolve: fix error title regarding private constructors
da-x Oct 11, 2019
9d11bda
resolve: shorten wording on private constructor error
da-x Oct 11, 2019
05db5a2
Report lint in external macros
memoryruins Oct 11, 2019
95a65cd
Add regression test for CONST_ERR lints in extern macros
memoryruins Oct 11, 2019
e039534
replace the hand-written binary search with the library one
Oct 12, 2019
d8c2956
Improve docs on some char boolean methods
Oct 6, 2019
a2b2362
do not reference LLVM for our concurrency memory model
RalfJung Oct 12, 2019
63cb2fa
compress the function, remove the assert check.
Oct 12, 2019
f363550
it's C++20
RalfJung Oct 12, 2019
d6ab45d
fix link targets
RalfJung Oct 12, 2019
9f09387
syntax: simplify maybe_annotate_with_ascription
Centril Oct 8, 2019
477a68b
simplify maybe_stage_features
Centril Oct 8, 2019
7effe63
simplify integer_lit
Centril Oct 8, 2019
94db37a
mbe: reduce panictry! uses.
Centril Oct 8, 2019
d0f8bd6
Rollup merge of #65039 - HeroicKatora:deny-by-default-book, r=Guillau…
Centril Oct 13, 2019
4dc0b8a
Rollup merge of #65069 - crgl:clone-from-vec-deque, r=bluss
Centril Oct 13, 2019
82fb193
Rollup merge of #65165 - BO41:char_docs, r=varkor
Centril Oct 13, 2019
963e4bc
Rollup merge of #65248 - estebank:mention-if-let, r=cramertj
Centril Oct 13, 2019
540278c
Rollup merge of #65250 - da-x:ctor-in-error-msgs, r=petrochenkov
Centril Oct 13, 2019
433ea1a
Rollup merge of #65295 - estebank:gotta-go-fast, r=nnethercote
Centril Oct 13, 2019
643261a
Rollup merge of #65320 - memoryruins:const_err, r=oli-obk
Centril Oct 13, 2019
af8a6e5
Rollup merge of #65327 - guanqun:remove-hand-binary-search, r=petroch…
Centril Oct 13, 2019
293d02d
Rollup merge of #65339 - RalfJung:atomic-ordering, r=Centril
Centril Oct 13, 2019
b143aa2
Rollup merge of #65357 - Centril:simplify-maybe-annotate-with-ascript…
Centril Oct 13, 2019
5af528a
Rollup merge of #65358 - Centril:smsf, r=davidtwco
Centril Oct 13, 2019
af54a3e
Rollup merge of #65359 - Centril:sil, r=davidtwco
Centril Oct 13, 2019
b828591
Rollup merge of #65360 - Centril:mbrpt, r=petrochenkov
Centril Oct 13, 2019
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
3 changes: 2 additions & 1 deletion src/librustc/lint/builtin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ declare_lint! {
declare_lint! {
pub CONST_ERR,
Deny,
"constant evaluation detected erroneous expression"
"constant evaluation detected erroneous expression",
report_in_external_macro: true
}

declare_lint! {
Expand Down
14 changes: 14 additions & 0 deletions src/test/ui/consts/auxiliary/external_macro.rs
8000
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#![feature(allow_internal_unstable)]

// Macro to help ensure CONST_ERR lint errors
// are not silenced in external macros.
// https://github.com/rust-lang/rust/issues/65300

#[macro_export]
#[allow_internal_unstable(type_ascription)]
macro_rules! static_assert {
($test:expr) => {
#[allow(dead_code)]
const _: () = [()][!($test: bool) as usize];
}
}
13 changes: 13 additions & 0 deletions src/test/ui/consts/const-external-macro-const-err.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// edition:2018
// aux-build:external_macro.rs

// Ensure that CONST_ERR lint errors
// are not silenced in external macros.
// https://github.com/rust-lang/rust/issues/65300

extern crate external_macro;
use external_macro::static_assert;

fn main() {
static_assert!(2 + 2 == 5); //~ ERROR
}
11 changes: 11 additions & 0 deletions src/test/ui/consts/const-external-macro-const-err.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
error: any use of this value will cause an error
--> $DIR/const-external-macro-const-err.rs:12:5
|
LL | static_assert!(2 + 2 == 5);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ index out of bounds: the len is 1 but the index is 1
|
= note: `#[deny(const_err)]` on by default
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)

error: aborting due to previous error

0