Skip to content
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

Rollup of 17 pull requests #89543

Closed
wants to merge 42 commits into from
Closed
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
ce450f8
Use the 64b inner:monotonize() implementation not the 128b one for aa…
AGSaidi Sep 4, 2021
4f5563d
Added abs_diff for integer types.
orlp Sep 9, 2021
77e7f8a
Added psadbw support for u8::abs_diff.
orlp Sep 9, 2021
d8dae4f
Perform type inference in range pattern
nbdd0121 Aug 16, 2021
ca1616c
Add ui test for issue 88074
nbdd0121 Aug 16, 2021
52a0403
Add a range pattern inference failing test
nbdd0121 Aug 16, 2021
c8f86ca
Elaborate predicates in min_specialization checks
matthewjasper Sep 30, 2021
051d5b0
Fix standard library for min_specialization changes
matthewjasper Sep 30, 2021
fa4072f
path.push() should work as expected on windows verbatim paths
seanyoung Sep 26, 2021
03cf07f
Update to the final LLVM 13.0.0 release
cuviper Oct 2, 2021
0a82acc
Query the fingerprint style during key reconstruction
Mark-Simulacrum Oct 2, 2021
63aaf88
Add a test that -Zquery-dep-graph -Zdump-dep-graph works
Mark-Simulacrum Oct 2, 2021
e2d3e09
Prevent macro ambiguity errors
bjorn3 May 30, 2021
abbead7
rustdoc: Improve doctest pass's name and module's name
camelid Oct 2, 2021
3da9dea
Add test for issue 89118.
hameerabbasi Oct 3, 2021
dc40430
Move test to correct path.
hameerabbasi Oct 3, 2021
d6a7e74
Combined 4 commits into 1
zvavybir Oct 2, 2021
cf19131
Try to recover from a `=>` -> `=` or `->` typo in a match arm
FabianWolff Oct 3, 2021
9626f2b
Fix extra `non_snake_case` warning for shorthand field bindings
FabianWolff Oct 2, 2021
6dd6e7c
Added tracking issue numbers for int_abs_diff.
orlp Oct 3, 2021
e34fd54
Deny `where` clauses on `auto` traits
FabianWolff Oct 3, 2021
55a3c86
:arrow_up: rust-analyzer
lnicola Oct 4, 2021
00152d8
Stabilize try_reserve
kornelski Aug 29, 2021
079c075
Use `TokenKind::similar_tokens()`
FabianWolff Oct 4, 2021
e5d0178
update Miri
RalfJung Oct 4, 2021
3cbd39f
Rollup merge of #87993 - kornelski:try_reserve_stable, r=joshtriplett
Manishearth Oct 5, 2021
537d112
Rollup merge of #88090 - nbdd0121:inference, r=nikomatsakis
Manishearth Oct 5, 2021
b4630da
Rollup merge of #88651 - AGSaidi:monotonize-inner-64b-aarch64, r=dtolnay
Manishearth Oct 5, 2021
e7a8472
Rollup merge of #88780 - orlp:int-abs-diff, r=m-ou-se
Manishearth Oct 5, 2021
803619d
Rollup merge of #89270 - seanyoung:join_fold, r=m-ou-se
Manishearth Oct 5, 2021
4aa2ec8
Rollup merge of #89343 - Mark-Simulacrum:no-args-queries, r=cjgillot
Manishearth Oct 5, 2021
65eb6e9
Rollup merge of #89413 - matthewjasper:spec-marker-fix, r=nikomatsakis
Manishearth Oct 5, 2021
63bd79a
Rollup merge of #89456 - cuviper:llvm-13, r=nikic
Manishearth Oct 5, 2021
26c2f32
Rollup merge of #89466 - Mark-Simulacrum:query-macros, r=oli-obk
Manishearth Oct 5, 2021
ef374c3
Rollup merge of #89473 - FabianWolff:issue-89469, r=joshtriplett
Manishearth Oct 5, 2021
9e8a249
Rollup merge of #89474 - camelid:better-pass-name, r=jyn514
Manishearth Oct 5, 2021
8d33cb7
Rollup merge of #89478 - zvavybir:master, r=jyn514
Manishearth Oct 5, 2021
0b2150a
Rollup merge of #89480 - hameerabbasi:issue-89118-test, r=jackh726
Manishearth Oct 5, 2021
a77b2f3
Rollup merge of #89487 - FabianWolff:issue-89396, r=petrochenkov
Manishearth Oct 5, 2021
ddd06e3
Rollup merge of #89494 - FabianWolff:issue-84075, r=davidtwco
Manishearth Oct 5, 2021
5733f37
Rollup merge of #89511 - lnicola:rust-analyzer-2021-10-04, r=lnicola
Manishearth Oct 5, 2021
6dce822
Rollup merge of #89536 - RalfJung:miri, r=RalfJung
Manishearth Oct 5, 2021
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
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -34,7 +34,7 @@
[submodule "src/llvm-project"]
path = src/llvm-project
url = https://github.com/rust-lang/llvm-project.git
branch = rustc/13.0-2021-08-08
branch = rustc/13.0-2021-09-30
[submodule "src/doc/embedded-book"]
path = src/doc/embedded-book
url = https://github.com/rust-embedded/book.git
32 changes: 14 additions & 18 deletions Cargo.lock
Original file line number Diff line number Diff line change
@@ -360,7 +360,7 @@ version = "0.1.0"
dependencies = [
"directories",
"rustc-workspace-hack",
"rustc_version",
"rustc_version 0.3.3",
"serde",
"serde_json",
"vergen",
@@ -1092,19 +1092,6 @@ dependencies = [
"termcolor",
]

[[package]]
name = "env_logger"
version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "54532e3223c5af90a6a757c90b5c5521564b07e5e7a958681bcd2afad421cdcd"
dependencies = [
"atty",
"humantime 2.0.1",
"log",
"regex",
"termcolor",
]

[[package]]
name = "env_logger"
version = "0.9.0"
@@ -2250,15 +2237,15 @@ version = "0.1.0"
dependencies = [
"colored",
"compiletest_rs",
"env_logger 0.8.1",
"env_logger 0.9.0",
"getrandom 0.2.0",
"hex 0.4.2",
"libc",
"log",
"measureme",
"rand 0.8.4",
"rustc-workspace-hack",
"rustc_version",
"rustc_version 0.4.0",
"shell-escape",
"smallvec",
]
@@ -4548,6 +4535,15 @@ dependencies = [
"semver 0.11.0",
]

[[package]]
name = "rustc_version"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366"
dependencies = [
"semver 1.0.3",
]

[[package]]
name = "rustdoc"
version = "0.0.0"
@@ -4908,9 +4904,9 @@ checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8"

[[package]]
name = "smallvec"
version = "1.6.1"
version = "1.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e"
checksum = "1ecab6c735a6bb4139c0caafd0cc3635748bbb3acf4550e8138122099251f309"

[[package]]
name = "snap"
1 change: 1 addition & 0 deletions compiler/rustc_ast/src/token.rs
Original file line number Diff line number Diff line change
@@ -295,6 +295,7 @@ impl TokenKind {
match *self {
Comma => Some(vec![Dot, Lt, Semi]),
Semi => Some(vec![Colon, Comma]),
FatArrow => Some(vec![Eq, RArrow]),
_ => None,
}
}
49 changes: 36 additions & 13 deletions compiler/rustc_ast_passes/src/ast_validation.rs
Original file line number Diff line number Diff line change
@@ -683,31 +683,53 @@ impl<'a> AstValidator<'a> {
}
}

fn emit_e0568(&self, span: Span, ident_span: Span) {
struct_span_err!(
self.session,
span,
E0568,
"auto traits cannot have super traits or lifetime bounds"
)
.span_label(ident_span, "auto trait cannot have super traits or lifetime bounds")
.span_suggestion(
span,
"remove the super traits or lifetime bounds",
String::new(),
Applicability::MachineApplicable,
)
.emit();
}

fn deny_super_traits(&self, bounds: &GenericBounds, ident_span: Span) {
if let [first @ last] | [first, .., last] = &bounds[..] {
let span = first.span().to(last.span());
struct_span_err!(self.session, span, E0568, "auto traits cannot have super traits")
.span_label(ident_span, "auto trait cannot have super traits")
.span_suggestion(
span,
"remove the super traits",
String::new(),
Applicability::MachineApplicable,
)
.emit();
if let [.., last] = &bounds[..] {
let span = ident_span.shrink_to_hi().to(last.span());
self.emit_e0568(span, ident_span);
}
}

fn deny_where_clause(&self, where_clause: &WhereClause, ident_span: Span) {
if !where_clause.predicates.is_empty() {
self.emit_e0568(where_clause.span, ident_span);
}
}

fn deny_items(&self, trait_items: &[P<AssocItem>], ident_span: Span) {
if !trait_items.is_empty() {
let spans: Vec<_> = trait_items.iter().map(|i| i.ident.span).collect();
let total_span = trait_items.first().unwrap().span.to(trait_items.last().unwrap().span);
struct_span_err!(
self.session,
spans,
E0380,
"auto traits cannot have methods or associated items"
"auto traits cannot have associated items"
)
.span_suggestion(
total_span,
"remove these associated items",
String::new(),
Applicability::MachineApplicable,
)
.span_label(ident_span, "auto trait cannot have items")
.span_label(ident_span, "auto trait cannot have associated items")
.emit();
}
}
@@ -1184,6 +1206,7 @@ impl<'a> Visitor<'a> for AstValidator<'a> {
// Auto traits cannot have generics, super traits nor contain items.
self.deny_generic_params(generics, item.ident.span);
self.deny_super_traits(bounds, item.ident.span);
self.deny_where_clause(&generics.where_clause, item.ident.span);
self.deny_items(trait_items, item.ident.span);
}
self.no_questions_in_bounds(bounds, "supertraits", true);
2 changes: 1 addition & 1 deletion compiler/rustc_data_structures/src/sso/map.rs
Original file line number Diff line number Diff line change
@@ -31,7 +31,7 @@ const SSO_ARRAY_SIZE: usize = 8;
//
// Missing HashMap API:
// all hasher-related
// try_reserve (unstable)
// try_reserve
// shrink_to (unstable)
// drain_filter (unstable)
// into_keys/into_values (unstable)
2 changes: 1 addition & 1 deletion compiler/rustc_data_structures/src/sso/set.rs
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@ use super::map::SsoHashMap;
//
// Missing HashSet API:
// all hasher-related
// try_reserve (unstable)
// try_reserve
// shrink_to (unstable)
// drain_filter (unstable)
// replace
13 changes: 7 additions & 6 deletions compiler/rustc_lint/src/nonstandard_style.rs
Original file line number Diff line number Diff line change
@@ -437,12 +437,13 @@ impl<'tcx> LateLintPass<'tcx> for NonSnakeCase {
if let hir::Node::Pat(parent_pat) = cx.tcx.hir().get(cx.tcx.hir().get_parent_node(hid))
{
if let PatKind::Struct(_, field_pats, _) = &parent_pat.kind {
for field in field_pats.iter() {
if field.ident != ident {
// Only check if a new name has been introduced, to avoid warning
// on both the struct definition and this pattern.
self.check_snake_case(cx, "variable", &ident);
}
if field_pats
.iter()
.any(|field| !field.is_shorthand && field.pat.hir_id == p.hir_id)
{
// Only check if a new name has been introduced, to avoid warning
// on both the struct definition and this pattern.
self.check_snake_case(cx, "variable", &ident);
}
return;
}
12 changes: 6 additions & 6 deletions compiler/rustc_macros/src/query.rs
Original file line number Diff line number Diff line change
@@ -455,28 +455,28 @@ pub fn rustc_queries(input: TokenStream) -> TokenStream {

// Pass on the fatal_cycle modifier
if let Some(fatal_cycle) = &modifiers.fatal_cycle {
attributes.push(quote! { #fatal_cycle });
attributes.push(quote! { (#fatal_cycle) });
};
// Pass on the storage modifier
if let Some(ref ty) = modifiers.storage {
let span = ty.span();
attributes.push(quote_spanned! {span=> storage(#ty) });
attributes.push(quote_spanned! {span=> (storage #ty) });
};
// Pass on the cycle_delay_bug modifier
if let Some(cycle_delay_bug) = &modifiers.cycle_delay_bug {
attributes.push(quote! { #cycle_delay_bug });
attributes.push(quote! { (#cycle_delay_bug) });
};
// Pass on the no_hash modifier
if let Some(no_hash) = &modifiers.no_hash {
attributes.push(quote! { #no_hash });
attributes.push(quote! { (#no_hash) });
};
// Pass on the anon modifier
if let Some(anon) = &modifiers.anon {
attributes.push(quote! { #anon });
attributes.push(quote! { (#anon) });
};
// Pass on the eval_always modifier
if let Some(eval_always) = &modifiers.eval_always {
attributes.push(quote! { #eval_always });
attributes.push(quote! { (#eval_always) });
};

// This uses the span of the query definition for the commas,
Loading