Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
a9e56e4
fix empty stack in deadlock error message
RalfJung Dec 6, 2025
673b3b1
Merge pull request #4748 from RalfJung/deadlock-empty-stack
RalfJung Dec 6, 2025
ef33430
run ptr_int tests with Tree Borrows
RalfJung Dec 7, 2025
4ac95c1
Merge pull request #4750 from RalfJung/ptr-int-tb
RalfJung Dec 7, 2025
8a99d48
genmc: suppress compare_exchange warnings from dependencies
RalfJung Dec 7, 2025
eb01df9
Merge pull request #4751 from RalfJung/genmc-warnings
RalfJung Dec 7, 2025
3f48189
ftruncate: return proper error code for non-file-backed FDs
RalfJung Dec 8, 2025
001d2f7
Merge pull request #4754 from RalfJung/ftruncate-non-file-backed
RalfJung Dec 8, 2025
c033444
tree borrows: split perform_protector_end_access from perform_access
royAmmerschuber Dec 3, 2025
ed768d3
Merge pull request #4741 from royAmmerschuber/feature/refactor-protec…
RalfJung Dec 8, 2025
5516e54
Remove `[no-mentions]` handler in our triagebot config
Urgau Dec 8, 2025
442b868
Merge pull request #4755 from Urgau/triagebot-remove-no-mentions
RalfJung Dec 8, 2025
27590b0
fix manual_let_else
RalfJung Dec 9, 2025
8014987
Merge pull request #4756 from RalfJung/clippy-manual_let_else
RalfJung Dec 9, 2025
85e3acc
tree borrows: put accesses diagnostics data into single struct
royAmmerschuber Dec 3, 2025
0830b84
Merge pull request #4740 from royAmmerschuber/feature/refactor-diagno…
RalfJung Dec 9, 2025
ff43366
Update `wrapping_sh[lr]` docs and examples
scottmcm Dec 10, 2025
71d7ae2
std: Don't use `linkat` on the `wasm32-wasi*` targets
alexcrichton Dec 10, 2025
f9b830c
Add more basic shift examples
scottmcm Dec 11, 2025
0b11cdf
Prepare for merging from rust-lang/rust
Dec 11, 2025
a9f0a49
Merge ref 'f5209000832c' from rust-lang/rust
Dec 11, 2025
a4777e4
Merge pull request #4758 from rust-lang/rustup-2025-12-11
RalfJung Dec 11, 2025
82118ff
gitconfig is not a toml file
RalfJung Dec 11, 2025
d1afde2
Merge pull request #4759 from RalfJung/contrib
RalfJung Dec 11, 2025
395c6f5
README: add more papers to the paper list
RalfJung Dec 12, 2025
bc81d84
Merge pull request #4760 from RalfJung/papers
RalfJung Dec 12, 2025
860716f
std: reorganize pipe implementations
joboet Sep 19, 2025
653520a
std: update pipe tests
joboet Sep 20, 2025
3fd0fb6
Prepare for merging from rust-lang/rust
Dec 13, 2025
96f2d59
Merge ref 'dc47a69ed94b' from rust-lang/rust
Dec 13, 2025
05227a7
Merge pull request #4762 from rust-lang/rustup-2025-12-13
oli-obk Dec 13, 2025
25a6fca
Cleanup context
JonathanBrouwer Dec 13, 2025
ebbb4d5
replace addr_of_mut with &raw mut in maybeuninit docs
inkreasing Dec 11, 2025
1da1a39
Remove `UnknownMetaItem` error
JonathanBrouwer Dec 13, 2025
f357e51
Stop using `IllFormedAttributeInputLint` for `macro_use`
JonathanBrouwer Dec 13, 2025
6a7ed13
Stop using `IllFormedAttributeInputLint` for `macro_use`
JonathanBrouwer Dec 13, 2025
69a59e8
Stop using `IllFormedAttributeInputLint` for `must_use`
JonathanBrouwer Dec 13, 2025
ae39d3d
Improve spans of malformed attribute errors
JonathanBrouwer Dec 13, 2025
cab9114
dangling pointer from temp cleanup
hkBst Nov 4, 2025
309e9ec
don't use no_main and no_core to test IBT
jyn514 Dec 14, 2025
e4ca889
Rollup merge of #146794 - joboet:reorganize-pipe, r=Mark-Simulacrum
matthiaskrgr Dec 14, 2025
d7a18fc
Rollup merge of #148490 - hkBst:dangling-ptr-lint-2, r=Urgau
matthiaskrgr Dec 14, 2025
a8460d0
Rollup merge of #149837 - scottmcm:wrapping-shift-docs, r=workingjubilee
matthiaskrgr Dec 14, 2025
ce2eec1
Rollup merge of #149864 - alexcrichton:wasi-avoid-linkat, r=joboet
matthiaskrgr Dec 14, 2025
d05ddf5
Rollup merge of #149885 - inkreasing:push-ovrwrllvzvmw, r=joboet
matthiaskrgr Dec 14, 2025
185f7dc
Rollup merge of #149949 - JonathanBrouwer:error_cleanup, r=jdonszelmann
matthiaskrgr Dec 14, 2025
98f8736
Rollup merge of #149969 - jyn514:ibt, r=jieyouxu
matthiaskrgr Dec 14, 2025
b655ea3
Rollup merge of #149998 - RalfJung:miri, r=RalfJung
matthiaskrgr Dec 14, 2025
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
9 changes: 0 additions & 9 deletions compiler/rustc_attr_parsing/messages.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,6 @@ attr_parsing_expects_feature_list =
attr_parsing_expects_features =
`{$name}` expects feature names

attr_parsing_ill_formed_attribute_input = {$num_suggestions ->
[1] attribute must be of the form {$suggestions}
*[other] valid forms for the attribute are {$suggestions}
}

attr_parsing_import_name_type_raw =
import name type can only be used with link kind `raw-dylib`

Expand Down Expand Up @@ -213,10 +208,6 @@ attr_parsing_stability_outside_std = stability attributes may not be used outsid
attr_parsing_suffixed_literal_in_attribute = suffixed literals are not allowed in attributes
.help = instead of using a suffixed literal (`1u8`, `1.0f32`, etc.), use an unsuffixed version (`1`, `1.0`, etc.)

attr_parsing_unknown_meta_item =
unknown meta item '{$item}'
.label = expected one of {$expected}

attr_parsing_unknown_version_literal =
unknown version literal format, assuming it refers to a future version

Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_attr_parsing/src/attributes/cfg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ pub fn parse_cfg<S: Stage>(
args: &ArgParser,
) -> Option<CfgEntry> {
let ArgParser::List(list) = args else {
cx.expected_list(cx.attr_span);
cx.expected_list(cx.attr_span, args);
return None;
};
let Some(single) = list.single() else {
Expand Down
6 changes: 3 additions & 3 deletions compiler/rustc_attr_parsing/src/attributes/codegen_attrs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ impl<S: Stage> SingleAttributeParser<S> for OptimizeParser {

fn convert(cx: &mut AcceptContext<'_, '_, S>, args: &ArgParser) -> Option<AttributeKind> {
let Some(list) = args.list() else {
cx.expected_list(cx.attr_span);
cx.expected_list(cx.attr_span, args);
return None;
};

Expand Down Expand Up @@ -478,7 +478,7 @@ fn parse_tf_attribute<S: Stage>(
) -> impl IntoIterator<Item = (Symbol, Span)> {
let mut features = Vec::new();
let ArgParser::List(list) = args else {
cx.expected_list(cx.attr_span);
cx.expected_list(cx.attr_span, args);
return features;
};
if list.is_empty() {
Expand Down Expand Up @@ -601,7 +601,7 @@ impl<S: Stage> SingleAttributeParser<S> for SanitizeParser {

fn convert(cx: &mut AcceptContext<'_, '_, S>, args: &ArgParser) -> Option<AttributeKind> {
let Some(list) = args.list() else {
cx.expected_list(cx.attr_span);
cx.expected_list(cx.attr_span, args);
return None;
};

Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_attr_parsing/src/attributes/confusables.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ impl<S: Stage> AttributeParser<S> for ConfusablesParser {
template!(List: &[r#""name1", "name2", ..."#]),
|this, cx, args| {
let Some(list) = args.list() else {
cx.expected_list(cx.attr_span);
cx.expected_list(cx.attr_span, args);
return;
};

Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_attr_parsing/src/attributes/debugger.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ impl<S: Stage> CombineAttributeParser<S> for DebuggerViualizerParser {
args: &ArgParser,
) -> impl IntoIterator<Item = Self::Item> {
let Some(l) = args.list() else {
cx.expected_list(args.span().unwrap_or(cx.attr_span));
cx.expected_list(cx.attr_span, args);
return None;
};
let Some(single) = l.single() else {
Expand Down
7 changes: 3 additions & 4 deletions compiler/rustc_attr_parsing/src/attributes/deprecation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,12 @@ impl<S: Stage> SingleAttributeParser<S> for DeprecationParser {
Some(get(cx, name, param.span(), param.args(), &suggestion)?);
}
_ => {
cx.unknown_key(
cx.expected_specific_argument(
param.span(),
param.path().to_string(),
if features.deprecated_suggestion() {
&["since", "note", "suggestion"]
&[sym::since, sym::note, sym::suggestion]
} else {
&["since", "note"]
&[sym::since, sym::note]
},
);
return None;
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_attr_parsing/src/attributes/doc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ impl DocParser {
}
Some(sym::attr) => {
let Some(list) = args.list() else {
cx.expected_list(cx.attr_span);
cx.expected_list(cx.attr_span, args);
return;
};

Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_attr_parsing/src/attributes/link_attrs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ impl<S: Stage> CombineAttributeParser<S> for LinkParser {
return None;
}
_ => {
cx.expected_list(cx.attr_span);
cx.expected_list(cx.attr_span, args);
return None;
}
};
Expand Down Expand Up @@ -379,7 +379,7 @@ impl LinkParser {
return true;
}
let Some(link_cfg) = item.args().list() else {
cx.expected_list(item.span());
cx.expected_list(item.span(), item.args());
return true;
};
let Some(link_cfg) = link_cfg.single() else {
Expand Down
25 changes: 4 additions & 21 deletions compiler/rustc_attr_parsing/src/attributes/macro_attrs.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
use rustc_errors::DiagArgValue;
use rustc_hir::attrs::MacroUseArgs;
use rustc_session::lint::builtin::INVALID_MACRO_EXPORT_ARGUMENTS;

use super::prelude::*;
use crate::session_diagnostics::IllFormedAttributeInputLint;

pub(crate) struct MacroEscapeParser;
impl<S: Stage> NoArgsAttributeParser<S> for MacroEscapeParser {
Expand Down Expand Up @@ -101,15 +99,8 @@ impl<S: Stage> AttributeParser<S> for MacroUseParser {
}
}
}
ArgParser::NameValue(_) => {
let suggestions = cx.suggestions();
cx.emit_err(IllFormedAttributeInputLint {
num_suggestions: suggestions.len(),
suggestions: DiagArgValue::StrListSepByAnd(
suggestions.into_iter().map(|s| format!("`{s}`").into()).collect(),
),
span,
});
ArgParser::NameValue(nv) => {
cx.expected_list_or_no_args(nv.args_span());
}
}
},
Expand Down Expand Up @@ -164,16 +155,8 @@ impl<S: Stage> SingleAttributeParser<S> for MacroExportParser {
}
}
}
ArgParser::NameValue(_) => {
let span = cx.attr_span;
let suggestions = cx.suggestions();
cx.emit_err(IllFormedAttributeInputLint {
num_suggestions: suggestions.len(),
suggestions: DiagArgValue::StrListSepByAnd(
suggestions.into_iter().map(|s| format!("`{s}`").into()).collect(),
),
span,
});
ArgParser::NameValue(nv) => {
cx.expected_list_or_no_args(nv.args_span());
return None;
}
};
Expand Down
14 changes: 2 additions & 12 deletions compiler/rustc_attr_parsing/src/attributes/must_use.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
use rustc_errors::DiagArgValue;

use super::prelude::*;
use crate::session_diagnostics::IllFormedAttributeInputLint;

pub(crate) struct MustUseParser;

Expand Down Expand Up @@ -44,15 +41,8 @@ impl<S: Stage> SingleAttributeParser<S> for MustUseParser {
};
Some(value_str)
}
ArgParser::List(_) => {
let suggestions = cx.suggestions();
cx.emit_err(IllFormedAttributeInputLint {
num_suggestions: suggestions.len(),
suggestions: DiagArgValue::StrListSepByAnd(
suggestions.into_iter().map(|s| format!("`{s}`").into()).collect(),
),
span: cx.attr_span,
});
ArgParser::List(list) => {
cx.expected_nv_or_no_args(list.span);
return None;
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ fn parse_derive_like<S: Stage>(
if args.no_args().is_ok() && !trait_name_mandatory {
return Some((None, ThinVec::new()));
}
cx.expected_list(cx.attr_span);
cx.expected_list(cx.attr_span, args);
return None;
};
let mut items = list.mixed();
Expand Down Expand Up @@ -96,15 +96,15 @@ fn parse_derive_like<S: Stage>(
let mut attributes = ThinVec::new();
if let Some(attrs) = items.next() {
let Some(attr_list) = attrs.meta_item() else {
cx.expected_list(attrs.span());
cx.unexpected_literal(attrs.span());
return None;
};
if !attr_list.path().word_is(sym::attributes) {
cx.expected_specific_argument(attrs.span(), &[sym::attributes]);
return None;
}
let Some(attr_list) = attr_list.args().list() else {
cx.expected_list(attrs.span());
cx.expected_list(attrs.span(), attr_list.args());
return None;
};

Expand Down
7 changes: 3 additions & 4 deletions compiler/rustc_attr_parsing/src/attributes/prototype.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ impl<S: Stage> SingleAttributeParser<S> for CustomMirParser {

fn convert(cx: &mut AcceptContext<'_, '_, S>, args: &ArgParser) -> Option<AttributeKind> {
let Some(list) = args.list() else {
cx.expected_list(cx.attr_span);
cx.expected_list(cx.attr_span, args);
return None;
};

Expand All @@ -46,9 +46,8 @@ impl<S: Stage> SingleAttributeParser<S> for CustomMirParser {
extract_value(cx, sym::dialect, arg, meta_item.span(), &mut dialect, &mut failed);
} else if let Some(arg) = meta_item.word_is(sym::phase) {
extract_value(cx, sym::phase, arg, meta_item.span(), &mut phase, &mut failed);
} else if let Some(word) = meta_item.path().word() {
let word = word.to_string();
cx.unknown_key(meta_item.span(), word, &["dialect", "phase"]);
} else if let Some(..) = meta_item.path().word() {
cx.expected_specific_argument(meta_item.span(), &[sym::dialect, sym::phase]);
failed = true;
} else {
cx.expected_name_value(meta_item.span(), None);
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_attr_parsing/src/attributes/repr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ impl<S: Stage> CombineAttributeParser<S> for ReprParser {
let mut reprs = Vec::new();

let Some(list) = args.list() else {
cx.expected_list(cx.attr_span);
cx.expected_list(cx.attr_span, args);
return reprs;
};

Expand Down Expand Up @@ -278,7 +278,7 @@ impl AlignParser {
fn parse<S: Stage>(&mut self, cx: &mut AcceptContext<'_, '_, S>, args: &ArgParser) {
match args {
ArgParser::NoArgs | ArgParser::NameValue(_) => {
cx.expected_list(cx.attr_span);
cx.expected_list(cx.attr_span, args);
}
ArgParser::List(list) => {
let Some(align) = list.single() else {
Expand Down
26 changes: 14 additions & 12 deletions compiler/rustc_attr_parsing/src/attributes/stability.rs
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ pub(crate) fn parse_stability<S: Stage>(
let mut since = None;

let ArgParser::List(list) = args else {
cx.expected_list(cx.attr_span);
cx.expected_list(cx.attr_span, args);
return None;
};

Expand All @@ -315,11 +315,7 @@ pub(crate) fn parse_stability<S: Stage>(
insert_value_into_option_or_error(cx, &param, &mut since, word.unwrap())?
}
_ => {
cx.emit_err(session_diagnostics::UnknownMetaItem {
span: param_span,
item: param.path().to_string(),
expected: &["feature", "since"],
});
cx.expected_specific_argument(param_span, &[sym::feature, sym::since]);
return None;
}
}
Expand Down Expand Up @@ -371,7 +367,7 @@ pub(crate) fn parse_unstability<S: Stage>(
let mut old_name = None;

let ArgParser::List(list) = args else {
cx.expected_list(cx.attr_span);
cx.expected_list(cx.attr_span, args);
return None;
};

Expand Down Expand Up @@ -426,11 +422,17 @@ pub(crate) fn parse_unstability<S: Stage>(
insert_value_into_option_or_error(cx, &param, &mut old_name, word.unwrap())?
}
_ => {
cx.emit_err(session_diagnostics::UnknownMetaItem {
span: param.span(),
item: param.path().to_string(),
expected: &["feature", "reason", "issue", "soft", "implied_by", "old_name"],
});
cx.expected_specific_argument(
param.span(),
&[
sym::feature,
sym::reason,
sym::issue,
sym::soft,
sym::implied_by,
sym::old_name,
],
);
return None;
}
}
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_attr_parsing/src/attributes/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ impl<S: Stage> SingleAttributeParser<S> for SkipDuringMethodDispatchParser {
let mut array = false;
let mut boxed_slice = false;
let Some(args) = args.list() else {
cx.expected_list(cx.attr_span);
cx.expected_list(cx.attr_span, args);
return None;
};
if args.is_empty() {
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_attr_parsing/src/attributes/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ pub(crate) fn parse_single_integer<S: Stage>(
args: &ArgParser,
) -> Option<u128> {
let Some(list) = args.list() else {
cx.expected_list(cx.attr_span);
cx.expected_list(cx.attr_span, args);
return None;
};
let Some(single) = list.single() else {
Expand Down
Loading
Loading