Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
9feb567
Updated the list of white-listed target features for x86
DevJPM Oct 25, 2020
cd95e93
Removed movbe from run-time-detect
DevJPM Oct 25, 2020
3daa93f
Updated documentation, x86 feature detection testing, and removed LLV…
DevJPM Oct 26, 2020
909c894
stability: More precise location for deprecation lint on macros
petrochenkov Nov 12, 2020
55d7f73
Tighten the bounds on atomic Ordering in std::sys::unix::weak
thomcc Nov 14, 2020
72b83af
Re-enable LLVM 9 target features with LLVM 9 being the minimum now
DevJPM Nov 15, 2020
c82a258
Turn top-level comments into module docs in MIR visitor
camelid Nov 15, 2020
dcc194c
instrument `QueryNormalizer::fold_ty`
lcnr Nov 16, 2020
7a15f02
linux: try to use libc getrandom to allow interposition
cuviper Nov 5, 2020
a035626
Try weak symbols for all linux syscall! wrappers
cuviper Nov 5, 2020
cd22381
Use syscall! for copy_file_range too
cuviper Nov 5, 2020
d701bf9
Enable AVX512 *epi64 variants by updating stdarch
vertexclique Nov 17, 2020
d17874f
bootstrap: use the same version number for rustc and cargo
pietroalbini Nov 17, 2020
9bbc4c1
add trailing_zeros and leading_zeros to non zero types
andjo403 Nov 17, 2020
95eff66
Fix handling of panic calls
camelid Nov 17, 2020
bdaa76c
Fix typo in `std::io::Write` docs
wchargin Nov 17, 2020
88584d5
change error for `LayoutErr::SizeOverflow`
lcnr Nov 18, 2020
c7e9029
Rollup merge of #78361 - DevJPM:master, r=workingjubilee
m-ou-se Nov 18, 2020
61134aa
Rollup merge of #78785 - cuviper:weak-getrandom, r=m-ou-se
m-ou-se Nov 18, 2020
92dcf6d
Rollup merge of #78999 - petrochenkov:deprid, r=eddyb
m-ou-se Nov 18, 2020
ad6fd9b
Rollup merge of #79039 - thomcc:weakly-relaxing, r=Amanieu
m-ou-se Nov 18, 2020
f85c3f7
Rollup merge of #79079 - camelid:mir-visit-docs, r=matthewjasper
m-ou-se Nov 18, 2020
126d88b
Rollup merge of #79114 - andjo403:nonzero_leading_trailing_zeros, r=m…
m-ou-se Nov 18, 2020
e2addb4
Rollup merge of #79131 - vertexclique:stdarch-update, r=Amanieu
m-ou-se Nov 18, 2020
83fcbd5
Rollup merge of #79133 - pietroalbini:simplify-stage0, r=Mark-Simulacrum
m-ou-se Nov 18, 2020
20fbe22
Rollup merge of #79145 - camelid:clippy-fix-panics, r=flip1995
m-ou-se Nov 18, 2020
5a9104f
Rollup merge of #79151 - wchargin:wchargin-io-write-docs, r=jyn514
m-ou-se Nov 18, 2020
43d13e2
Rollup merge of #79158 - lcnr:lazy-norm-coerce, r=oli-obk
m-ou-se Nov 18, 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
Prev Previous commit
Next Next commit
stability: More precise location for deprecation lint on macros
  • Loading branch information
petrochenkov committed Nov 12, 2020
commit 909c8945b172662494c0d0bd4cc89af618a41ffb
5 changes: 3 additions & 2 deletions compiler/rustc_middle/src/middle/stability.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
pub use self::StabilityLevel::*;

use crate::ty::{self, TyCtxt};
use rustc_ast::CRATE_NODE_ID;
use rustc_ast::NodeId;
use rustc_attr::{self as attr, ConstStability, Deprecation, Stability};
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
use rustc_errors::{Applicability, DiagnosticBuilder};
Expand Down Expand Up @@ -211,13 +211,14 @@ pub fn early_report_deprecation(
suggestion: Option<Symbol>,
lint: &'static Lint,
span: Span,
node_id: NodeId,
) {
if span.in_derive_expansion() {
return;
}

let diag = BuiltinLintDiagnostics::DeprecatedMacro(suggestion, span);
lint_buffer.buffer_lint_with_diagnostic(lint, CRATE_NODE_ID, span, message, diag);
lint_buffer.buffer_lint_with_diagnostic(lint, node_id, span, message, diag);
}

fn late_report_deprecation(
Expand Down
1 change: 1 addition & 0 deletions compiler/rustc_resolve/src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1028,6 +1028,7 @@ impl<'a> Resolver<'a> {
depr.suggestion,
lint,
span,
node_id,
);
}
}
Expand Down
10 changes: 10 additions & 0 deletions src/test/ui/lint/expansion-time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@ mod benches {
fn foo() {}
}

#[deprecated = "reason"]
macro_rules! deprecated {
() => {}
}

#[allow(deprecated)]
mod deprecated {
deprecated!(); // No warning
}

#[warn(incomplete_include)]
fn main() {
// WARN see in the stderr file, the warning points to the included file.
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/lint/expansion-time.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ LL | 2
| ^
|
note: the lint level is defined here
--> $DIR/expansion-time.rs:15:8
--> $DIR/expansion-time.rs:25:8
|
LL | #[warn(incomplete_include)]
| ^^^^^^^^^^^^^^^^^^
Expand Down