Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
107 commits
Select commit Hold shift + click to select a range
b2c848a
Implement `fallocate` for linux, only supporting the default mode, th…
LorrensP-2158466 Jun 27, 2026
954bc43
Merge pull request #5147 from LorrensP-2158466/linux-fallocate
RalfJung Jul 12, 2026
6e97f13
Use read/write helpers from libc_utils
TheDoctor314 Jun 30, 2026
984c35c
Merge pull request #5148 from TheDoctor314/refactor-libc-tests
RalfJung Jul 12, 2026
a1c3242
memcmp: add tests and update comments
RalfJung Jul 12, 2026
d449d78
Merge pull request #5178 from RalfJung/memcmp
RalfJung Jul 12, 2026
d5fbe96
Prepare for merging from rust-lang/rust
RalfJung Jul 13, 2026
becbf2c
Merge ref '48c2cee70232' from rust-lang/rust
RalfJung Jul 13, 2026
e04f9b9
weak linkage extern statics need to be managed deparately due to thei…
RalfJung Jul 13, 2026
f59064c
make 'environ' available as weak symbol on FreeBSD
RalfJung Jul 13, 2026
a19e2ec
Merge pull request #5180 from RalfJung/rustup
RalfJung Jul 13, 2026
6dce531
FileDescription: make destroy a NOP by default and document the risks
RalfJung Jul 13, 2026
1d916ae
Merge pull request #5183 from RalfJung/file-description-destroy
RalfJung Jul 13, 2026
9e925f1
tests: socketpair-data-race: utilize shared helpers
faukah Jul 13, 2026
23b5d94
tests: socketpair_block_read_twice: utilize shared helpers
faukah Jul 13, 2026
485d963
tests: socketpair_block_write_twice: utilize shared helpers
faukah Jul 13, 2026
c635087
Prepare for merging from rust-lang/rust
Jul 14, 2026
1419d99
Merge ref '55b6bd8ecbed' from rust-lang/rust
Jul 14, 2026
38167b8
clippy
RalfJung Jul 14, 2026
03f5fde
Merge pull request #5190 from rust-lang/rustup-2026-07-14
RalfJung Jul 14, 2026
9aad4a2
remove bogus sanity check from weak memory mixed-size logic
RalfJung Jul 13, 2026
5bd74ba
more consistent name for some MemoryCellClocks methods
RalfJung Jul 13, 2026
5a083e5
explain why there is no sanity check
RalfJung Jul 14, 2026
bd82439
Merge pull request #5188 from RalfJung/mixed-size-ice
RalfJung Jul 14, 2026
2d224b6
move scheduler into its own file
RalfJung Jul 14, 2026
9726f1d
Lazily remove dropped readiness watchers
WhySoBad Jul 11, 2026
977820b
Merge pull request #5195 from RalfJung/scheduler
RalfJung Jul 14, 2026
0c087b1
Merge pull request #5172 from WhySoBad/tokio-on-poll-selector
RalfJung Jul 14, 2026
466390e
Prepare for merging from rust-lang/rust
Jul 15, 2026
9dd4d83
Merge ref '38a0576951fb' from rust-lang/rust
Jul 15, 2026
b6cb5a1
Lazily destroy source file descriptions
WhySoBad Jul 13, 2026
56d55d5
Merge pull request #5196 from rust-lang/rustup-2026-07-15
RalfJung Jul 15, 2026
65f3915
Merge pull request #5192 from WhySoBad/network-socket-lazy-destroy
RalfJung Jul 15, 2026
26cd724
de-duplicate EmulateItemResult handling
RalfJung Jul 15, 2026
9a82a4d
ensure all fields of a callback implement VisitProvenance
RalfJung Jul 14, 2026
f410c4a
socketpair: keep strong ref while blocking
RalfJung Jul 15, 2026
a179e4c
add eventfd closed-while-blocked test
RalfJung Jul 15, 2026
bf25169
consistently hold strong refs in blocking FD callbacks
RalfJung Jul 15, 2026
a684941
use eventfd helpers for eventfd tests
RalfJung Jul 15, 2026
e7307fc
add test for unblocking eventfd via a dup'ed FD
RalfJung Jul 15, 2026
cdbca7c
Merge pull request #5197 from RalfJung/close-while-block
RalfJung Jul 15, 2026
56bc850
move LLVM intrinsic implementations to intrinsics module
RalfJung Jul 15, 2026
3eb0e21
use shared EmulateItemResult infrastructure for LLVM intrinsics
RalfJung Jul 15, 2026
d10e903
Merge pull request #5198 from RalfJung/llvm-intrinsics
RalfJung Jul 15, 2026
622d855
ensure we test simd_shr on both signed and unsigned types
RalfJung Jul 15, 2026
852e49b
Merge pull request #5200 from RalfJung/simd_shr
RalfJung Jul 15, 2026
5dcbd23
add test for epoll watching an FD that is kept alive by a thread bloc…
RalfJung Jul 15, 2026
4e66447
introduce delayed readiness updates to VirtualSocket can register an …
RalfJung Jul 15, 2026
57a0a2e
Remove FileHandle::destroy
RalfJung Jul 15, 2026
568b218
Remove FileDescription::destroy
RalfJung Jul 15, 2026
e312e88
fix outdated comment (already outdated before this PR)
RalfJung Jul 15, 2026
f525a45
Merge pull request #5201 from RalfJung/drop-not-destroy
RalfJung Jul 15, 2026
60aa3f6
Prepare for merging from rust-lang/rust
Jul 16, 2026
8ec86c2
Merge ref 'fcbe7917ba18' from rust-lang/rust
Jul 16, 2026
df05fd5
Merge pull request #5205 from rust-lang/rustup-2026-07-16
RalfJung Jul 16, 2026
0f6c0bf
fix delayed readiness update sometimes being too late
RalfJung Jul 16, 2026
98617fd
test eventfd initval
RalfJung Jul 16, 2026
d52478e
add test for closing an FD that is being actively watched
RalfJung Jul 16, 2026
ac7b24d
keep weak ref to watched FD in readiness interest table
RalfJung Jul 16, 2026
203300e
delay removing watched FDs that are being closed from the interest
RalfJung Jul 16, 2026
6034457
we do not need ReadinessWatcherId any more
RalfJung Jul 16, 2026
de935d4
actually retry 'apt update' when fetching something fails
RalfJung Jul 16, 2026
0ace5e4
Merge pull request #5207 from RalfJung/delay-watched-fd-close-cleanup
RalfJung Jul 16, 2026
deb891a
Remove SIZE generic param from DisplayBuffer in core::net
Darksonn Jul 16, 2026
1fb01bf
Merge pull request #5189 from faukah/faukah/push-quwzmrnzkxuu
RalfJung Jul 16, 2026
e1e3698
epoll tests: use eventfd helpers
RalfJung Jul 16, 2026
917b9bd
Merge pull request #5209 from RalfJung/test-helpers
RalfJung Jul 16, 2026
168ba92
Prepare for merging from rust-lang/rust
Jul 17, 2026
d0a2458
Merge ref '4a9d5368df64' from rust-lang/rust
Jul 17, 2026
19f69a1
Merge pull request #5211 from rust-lang/rustup-2026-07-17
oli-obk Jul 17, 2026
af45e4c
add AI policy
RalfJung Jul 16, 2026
4bc6739
FdTable: fix insert_with_min_num logic
RalfJung Jul 16, 2026
de8cb1c
replace global readiness watcher table by per-FD state
RalfJung Jul 16, 2026
e21b92a
move readiness vector clock tracking into per-FD state so it works ev…
RalfJung Jul 16, 2026
45d0d7a
clean up epoll interest lists immediately when FD gets dropped
RalfJung Jul 16, 2026
5594e81
epoll: implement Illumos semantics for closed file descriptors
RalfJung Jul 16, 2026
8fd5811
do not treat host IO events as 'release' events from the current thread
RalfJung Jul 17, 2026
07f8418
Merge pull request #5210 from RalfJung/readiness-watched
RalfJung Jul 17, 2026
a8776f3
fix: fix typo in `ReadinessWatched` doc comment
WhySoBad Jul 17, 2026
ef737e7
test: add data race test for `poll`
WhySoBad Jul 17, 2026
170320e
Merge pull request #5213 from WhySoBad/poll-data-race-test
RalfJung Jul 17, 2026
dc2c71a
Merge pull request #5208 from RalfJung/ai
RalfJung Jul 18, 2026
d7c50b1
Resolve preadv/pwritev as weak symbols on Android
Joel-Wwalker Jul 18, 2026
326508a
Merge pull request #5212 from Joel-Wwalker/5080-android-fs
RalfJung Jul 18, 2026
4f0d388
add std::simd swizzle_dyn test
RalfJung Jul 18, 2026
37af38d
Merge pull request #5215 from RalfJung/swizzle-dyn
RalfJung Jul 18, 2026
8e89256
cleanup 1
qaijuang Jul 18, 2026
258e133
cleanup 2
qaijuang Jul 18, 2026
a8b5666
cleanup 3
qaijuang Jul 18, 2026
9f6b46c
cleanup 4
qaijuang Jul 18, 2026
86be2a7
cleanup 5
qaijuang Jul 18, 2026
df1f60e
cleanup 6
qaijuang Jul 18, 2026
ff9062b
cleanup 7
qaijuang Jul 18, 2026
acd08a5
cleanup 8
qaijuang Jul 18, 2026
e490bc7
cleanup 9
qaijuang Jul 18, 2026
56d9c59
cleanup 10
qaijuang Jul 18, 2026
e33662a
Move `std::io::BufRead` to `alloc::io`
bushrat011899 May 21, 2026
982072a
Fix documentation links to `BufRead`
bushrat011899 May 22, 2026
f15b19d
address rustfmt concerns
qaijuang Jul 18, 2026
6109397
address additional nits
qaijuang Jul 18, 2026
7c0c4ef
Prepend `read_until` and `skip_until` with `default_`
bushrat011899 Jul 19, 2026
d0c3ca1
[rustc_abi] Customize `Debug` for `Primitive` and `Scalar`
scottmcm Jul 18, 2026
7bd9ba7
Rollup merge of #158546 - bushrat011899:alloc_io_bufread, r=clarfonthey
jhpratt Jul 19, 2026
571fa58
Rollup merge of #159372 - Darksonn:core-net-displaybuffer, r=jhpratt
jhpratt Jul 19, 2026
e82135a
Rollup merge of #159548 - RalfJung:miri, r=RalfJung
jhpratt Jul 19, 2026
052331f
Rollup merge of #159508 - qaijuang:rustc-attr-parsing-cleanup, r=mejrs
jhpratt Jul 19, 2026
152f857
Rollup merge of #159539 - scottmcm:nicer-rustc_abi-primitive-debug, r…
jhpratt Jul 19, 2026
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
82 changes: 80 additions & 2 deletions compiler/rustc_abi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1391,10 +1391,21 @@ impl Float {
F128 => dl.f128_align,
})
}

pub fn ty_str(self) -> &'static str {
use Float::*;

match self {
F16 => "f16",
F32 => "f32",
F64 => "f64",
F128 => "f128",
}
}
}

/// Fundamental unit of memory access and layout.
#[derive(Copy, Clone, PartialEq, Eq, Hash, Debug)]
#[derive(Copy, Clone, PartialEq, Eq, Hash)]
#[cfg_attr(feature = "nightly", derive(StableHash))]
pub enum Primitive {
/// The `bool` is the signedness of the `Integer` type.
Expand All @@ -1409,6 +1420,29 @@ pub enum Primitive {
Pointer(AddressSpace),
}

impl fmt::Debug for Primitive {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let name = match *self {
Primitive::Int(integer, is_signed) => {
if is_signed {
integer.int_ty_str()
} else {
integer.uint_ty_str()
}
}
Primitive::Float(float) => float.ty_str(),
Primitive::Pointer(addr_space) => {
if addr_space == AddressSpace::ZERO {
"pointer"
} else {
return write!(f, "pointer({addr_space:?})");
}
}
};
f.write_str(name)
}
}

impl Primitive {
pub fn size<C: HasDataLayout>(self, cx: &C) -> Size {
use Primitive::*;
Expand Down Expand Up @@ -1454,6 +1488,32 @@ pub struct WrappingRange {
}

impl WrappingRange {
fn debug_as(&self, size: Size, is_signed: bool) -> impl fmt::Debug {
let range = *self;
fmt::from_fn(move |f| {
if range == WrappingRange::full(size) {
// This is intentionally not using `is_full_for` so that we ensure
// different values always debug-print differently.
// We don't need the full details when it's the canonical full range,
// but if one is looking at the debug output it might be that seeing
// `u8 is (..=0) | (1..)` instead of `u8 is ..` is the information
// you needed because the problem is that despite being *a* full
// range it's not *the* canonical one you expected it was.
f.write_str("..")
} else if is_signed {
let start = size.sign_extend(range.start);
let end = size.sign_extend(range.end);
if start > end {
write!(f, "(..={}) | ({}..)", end, start)
} else {
write!(f, "{}..={}", start, end)
}
} else {
write!(f, "{:?}", range)
}
})
}

pub fn full(size: Size) -> Self {
Self { start: 0, end: size.unsigned_int_max() }
}
Expand Down Expand Up @@ -1558,7 +1618,7 @@ impl fmt::Debug for WrappingRange {
}

/// Information about one scalar component of a Rust type.
#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
#[derive(Clone, Copy, PartialEq, Eq, Hash)]
#[cfg_attr(feature = "nightly", derive(StableHash))]
pub enum Scalar {
Initialized {
Expand All @@ -1579,6 +1639,24 @@ pub enum Scalar {
},
}

impl fmt::Debug for Scalar {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {
Scalar::Initialized { value, valid_range } => {
let (size, is_signed) = match *value {
Primitive::Int(integer, is_signed) => (integer.size(), is_signed),
Primitive::Float(float) => (float.size(), false),
Primitive::Pointer(_) => (Size::from_bits(128), false),
};
write!(f, "{value:?} is {:?}", valid_range.debug_as(size, is_signed))
}
Scalar::Union { value } => {
write!(f, "union {value:?}")
}
}
}
}

impl Scalar {
#[inline]
pub fn is_bool(&self) -> bool {
Expand Down
8 changes: 6 additions & 2 deletions compiler/rustc_attr_parsing/src/attributes/cfg_select.rs
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,9 @@ fn lint_unreachable(
}
}
}
Some(_) => { /* for now we don't bother solving these */ }
Some(_) => {
// FIXME(https://github.com/rust-lang/rust/pull/149960#issuecomment-3780301699): expand capabilities.
}
},
CfgEntry::Not(inner, _) => match &**inner {
CfgEntry::NameValue { name, value: None, .. } => {
Expand All @@ -247,7 +249,9 @@ fn lint_unreachable(
}
}
}
_ => { /* for now we don't bother solving these */ }
_ => {
// FIXME(https://github.com/rust-lang/rust/pull/149960#issuecomment-3780301699): expand capabilities.
}
},
CfgEntry::All(_, _) | CfgEntry::Any(_, _) => {
/* for now we don't bother solving these */
Expand Down
29 changes: 13 additions & 16 deletions compiler/rustc_attr_parsing/src/check_cfg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ fn to_check_cfg_arg(name: Ident, value: Option<Symbol>, quotes: EscapeQuotes) ->
if let Some(value) = value {
let value = str::escape_debug(value.as_str()).to_string();
let values = match quotes {
EscapeQuotes::Yes => format!("\\\"{}\\\"", value.replace("\"", "\\\\\\\\\"")),
EscapeQuotes::Yes => format!("\\\"{}\\\"", value.replace('"', "\\\\\\\\\"")),
EscapeQuotes::No => format!("\"{value}\""),
};
format!("cfg({name}, values({values}))")
Expand Down Expand Up @@ -182,15 +182,15 @@ pub(crate) fn unexpected_cfg_name(
possibilities.sort_by_key(|s| s.as_str());

let get_possibilities_sub = || {
if !possibilities.is_empty() {
if possibilities.is_empty() {
None
} else {
let possibilities =
possibilities.iter().copied().cloned().collect::<Vec<_>>().into();
possibilities.iter().copied().copied().collect::<Vec<_>>().into();
Some(diagnostics::unexpected_cfg_name::ExpectedValues {
best_match,
possibilities,
})
} else {
None
}
};

Expand Down Expand Up @@ -249,15 +249,15 @@ pub(crate) fn unexpected_cfg_name(

let (possibilities, and_more) =
sort_and_truncate_possibilities(sess, possibilities, FilterWellKnownNames::Yes);
let expected_names = if !possibilities.is_empty() {
let expected_names = if possibilities.is_empty() {
None
} else {
let possibilities: Vec<_> =
possibilities.into_iter().map(|s| Ident::new(s, name_span)).collect();
Some(diagnostics::unexpected_cfg_name::ExpectedNames {
possibilities: possibilities.into(),
and_more,
})
} else {
None
};
diagnostics::unexpected_cfg_name::CodeSuggestion::SimilarValues {
with_similar_values: similar_values,
Expand Down Expand Up @@ -351,14 +351,12 @@ pub(crate) fn unexpected_cfg_value(

let suggestion = if let Some((value, value_span)) = value {
// Suggest the most probable if we found one
if let Some(best_match) = find_best_match_for_name(&possibilities, value, None) {
Some(diagnostics::unexpected_cfg_value::ChangeValueSuggestion::SimilarName {
find_best_match_for_name(&possibilities, value, None).map(|best_match| {
diagnostics::unexpected_cfg_value::ChangeValueSuggestion::SimilarName {
span: value_span,
best_match,
})
} else {
None
}
}
})
} else if let &[first_possibility] = &possibilities[..] {
Some(diagnostics::unexpected_cfg_value::ChangeValueSuggestion::SpecifyValue {
span: name_span.shrink_to_hi(),
Expand Down Expand Up @@ -450,8 +448,7 @@ fn possible_well_known_names_for_cfg_value(sess: &Session, value: Symbol) -> Vec
sess.check_config
.expecteds
.get(*name)
.map(|expected_values| expected_values.contains(&Some(value)))
.unwrap_or_default()
.is_some_and(|expected_values| expected_values.contains(&Some(value)))
})
.copied()
.collect::<Vec<_>>();
Expand Down
26 changes: 11 additions & 15 deletions compiler/rustc_attr_parsing/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ pub(super) struct GroupTypeInnerAccept {
}

pub(crate) type AcceptFn =
Box<dyn for<'sess, 'a> Fn(&mut AcceptContext<'_, 'sess>, &ArgParser) + Send + Sync>;
Box<dyn for<'sess> Fn(&mut AcceptContext<'_, 'sess>, &ArgParser) + Send + Sync>;
pub(crate) type FinalizeFn = fn(&mut FinalizeContext<'_, '_>) -> Option<AttributeKind>;

macro_rules! attribute_parsers {
Expand Down Expand Up @@ -463,7 +463,7 @@ impl<'f, 'sess: 'f> AcceptContext<'f, 'sess> {
AttributeDiagnosticContext { ctx: self, custom_suggestions: Vec::new() }
}

/// Asserts that this MetaItem is a list that contains a single element. Emits an error and
/// Asserts that this `MetaItem` is a list that contains a single element. Emits an error and
/// returns `None` if it is not the case.
///
/// Some examples:
Expand Down Expand Up @@ -668,11 +668,7 @@ impl ExpectNameValue for MetaItemParser {
cx.adcx().expected_name_value(self.span(), name);
}

let Some((word, arg)) = word.zip(arg) else {
return None;
};

Some((word, arg))
word.zip(arg)
}
}

Expand Down Expand Up @@ -740,7 +736,7 @@ impl<'f, 'sess> Deref for AcceptContext<'f, 'sess> {
}
}

impl<'f, 'sess> DerefMut for AcceptContext<'f, 'sess> {
impl DerefMut for AcceptContext<'_, '_> {
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.shared
}
Expand Down Expand Up @@ -841,7 +837,7 @@ pub enum ShouldEmit {
}

impl ShouldEmit {
pub(crate) fn emit_err(&self, diag: Diag<'_>) -> ErrorGuaranteed {
pub(crate) fn emit_err(self, diag: Diag<'_>) -> ErrorGuaranteed {
match self {
ShouldEmit::EarlyFatal { .. } if diag.level() == Level::DelayedBug => diag.emit(),
ShouldEmit::EarlyFatal { .. } => diag.upgrade_to_fatal().emit(),
Expand All @@ -865,16 +861,16 @@ impl<'a, 'f, 'sess: 'f> AttributeDiagnosticContext<'a, 'f, 'sess> {
span: Span,
reason: AttributeParseErrorReason<'_>,
) -> ErrorGuaranteed {
let suggestions = if !self.custom_suggestions.is_empty() {
AttributeParseErrorSuggestions::CreatedByParser(mem::take(&mut self.custom_suggestions))
} else {
let suggestions = if self.custom_suggestions.is_empty() {
AttributeParseErrorSuggestions::CreatedByTemplate(self.template_suggestions())
} else {
AttributeParseErrorSuggestions::CreatedByParser(mem::take(&mut self.custom_suggestions))
};

self.emit_err(AttributeParseError {
span,
attr_span: self.attr_span,
template: self.template.clone(),
template: *self.template,
path: self.attr_path.clone(),
description: self.parsed_description,
reason,
Expand Down Expand Up @@ -1125,15 +1121,15 @@ impl<'a, 'f, 'sess: 'f> AttributeDiagnosticContext<'a, 'f, 'sess> {
}
}

impl<'a, 'f, 'sess: 'f> Deref for AttributeDiagnosticContext<'a, 'f, 'sess> {
impl<'f, 'sess: 'f> Deref for AttributeDiagnosticContext<'_, 'f, 'sess> {
type Target = AcceptContext<'f, 'sess>;

fn deref(&self) -> &Self::Target {
self.ctx
}
}

impl<'a, 'f, 'sess: 'f> DerefMut for AttributeDiagnosticContext<'a, 'f, 'sess> {
impl<'f, 'sess: 'f> DerefMut for AttributeDiagnosticContext<'_, 'f, 'sess> {
fn deref_mut(&mut self) -> &mut Self::Target {
self.ctx
}
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_attr_parsing/src/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ impl IllFormedAttributeInput {
Self {
num_suggestions: suggestions.len(),
suggestions: DiagArgValue::StrListSepByAnd(
suggestions.into_iter().map(|s| format!("`{s}`").into()).collect(),
suggestions.iter().map(|s| format!("`{s}`").into()).collect(),
),
has_docs: docs.is_some(),
docs: docs.unwrap_or(""),
Expand Down
11 changes: 5 additions & 6 deletions compiler/rustc_attr_parsing/src/interface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ impl<'sess> AttributeParser<'sess> {
/// errors will be emitted as a delayed bugs. in other words, we *expect* attributes parsed
/// with `parse_limited` to be reparsed later during ast lowering where we *do* emit the errors
///
/// Due to this function not taking in RegisteredTools, *do not* use this for parsing any lint attributes
/// Due to this function not taking in `RegisteredTools`, *do not* use this for parsing any lint attributes
pub fn parse_limited(
sess: &'sess Session,
attrs: &[ast::Attribute],
Expand All @@ -86,7 +86,7 @@ impl<'sess> AttributeParser<'sess> {
/// This does the same as `parse_limited`, except it has a `should_emit` parameter which allows it to emit errors.
/// Usually you want `parse_limited`, which emits no errors.
///
/// Due to this function not taking in RegisteredTools, *do not* use this for parsing any lint attributes
/// Due to this function not taking in `RegisteredTools`, *do not* use this for parsing any lint attributes
pub fn parse_limited_should_emit(
sess: &'sess Session,
attrs: &[ast::Attribute],
Expand Down Expand Up @@ -256,7 +256,7 @@ impl<'sess> AttributeParser<'sess> {
}

pub(crate) fn sess(&self) -> &'sess Session {
&self.sess
self.sess
}

pub(crate) fn features(&self) -> &'sess Features {
Expand Down Expand Up @@ -328,7 +328,6 @@ impl<'sess> AttributeParser<'sess> {
}
ast::AttrKind::Synthetic(synthetic) => {
synthetic_attr_state.accept_synthetic_attr(attr_span, lower_span, synthetic);
continue;
}
ast::AttrKind::Normal(n) => {
attr_paths.push(PathParser(&n.item.path));
Expand All @@ -347,7 +346,7 @@ impl<'sess> AttributeParser<'sess> {
);
self.check_attribute_stability(&attr_path, attr_span, accept.stability);
if let [part] = parts.as_slice() {
debug_assert!(BUILTIN_ATTRIBUTE_MAP.contains(&part));
debug_assert!(BUILTIN_ATTRIBUTE_MAP.contains(part));
}

let Some(args) = ArgParser::from_attr_args(
Expand Down Expand Up @@ -417,7 +416,7 @@ impl<'sess> AttributeParser<'sess> {
Self::check_target(&accept.allowed_targets, "", &mut cx);
#[cfg(debug_assertions)]
if !cx.shared.has_lint_been_emitted.load(Ordering::Relaxed) {
cx.shared.cx.check_args_used(&attr, &args)
cx.shared.cx.check_args_used(attr, &args)
}
} else {
let attr = AttrItem {
Expand Down
Loading
Loading