Skip to content

Commit c6649aa

Browse files
committed
Auto merge of #2665 - RalfJung:rustup, r=RalfJung
Rustup
2 parents 9ef0de9 + 8d7f257 commit c6649aa

File tree

702 files changed

+13057
-8073
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

702 files changed

+13057
-8073
lines changed

.git-blame-ignore-revs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@ a06baa56b95674fc626b3c3fd680d6a65357fe60
44
95e00bfed801e264e9c4ac817004153ca0f19eb6
55
# reformat with new rustfmt
66
971c549ca334b7b7406e61e958efcca9c4152822
7+
# refactor infcx building
8+
283abbf0e7d20176f76006825b5c52e9a4234e4c

.mailmap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ Hsiang-Cheng Yang <rick68@users.noreply.github.com>
217217
Ian Jackson <ijackson@chiark.greenend.org.uk> <ian.jackson@citrix.com>
218218
Ian Jackson <ijackson@chiark.greenend.org.uk> <ijackson+github@slimy.greenend.org.uk>
219219
Ian Jackson <ijackson@chiark.greenend.org.uk> <iwj@xenproject.org>
220-
Ibraheem Ahmed <ibrah1440@gmail.com>
220+
Ibraheem Ahmed <ibraheem@ibraheem.ca> <ibrah1440@gmail.com>
221221
Ilyong Cho <ilyoan@gmail.com>
222222
inquisitivecrystal <22333129+inquisitivecrystal@users.noreply.github.com>
223223
Irina Popa <irinagpopa@gmail.com>

.reuse/dep5

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,6 @@ Files: *
66
Copyright: The Rust Project Developers (see https://thanks.rust-lang.org)
77
License: MIT or Apache-2.0
88

9-
Files: library/std/src/sync/mpsc/mpsc_queue.rs
10-
library/std/src/sync/mpsc/spsc_queue.rs
11-
Copyright: 2010-2011 Dmitry Vyukov
12-
License: BSD-2-Clause
13-
149
Files: src/librustdoc/html/static/fonts/FiraSans*
1510
Copyright: 2014, Mozilla Foundation, 2014, Telefonica S.A.
1611
License: OFL-1.1

Cargo.lock

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ dependencies = [
273273

274274
[[package]]
275275
name = "cargo"
276-
version = "0.67.0"
276+
version = "0.68.0"
277277
dependencies = [
278278
"anyhow",
279279
"atty",
@@ -473,9 +473,9 @@ version = "0.1.0"
473473

474474
[[package]]
475475
name = "cc"
476-
version = "1.0.73"
476+
version = "1.0.76"
477477
source = "registry+https://github.com/rust-lang/crates.io-index"
478-
checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11"
478+
checksum = "76a284da2e6fe2092f2353e51713435363112dfd60030e22add80be333fb928f"
479479
dependencies = [
480480
"jobserver",
481481
]
@@ -502,9 +502,9 @@ dependencies = [
502502

503503
[[package]]
504504
name = "chalk-derive"
505-
version = "0.80.0"
505+
version = "0.87.0"
506506
source = "registry+https://github.com/rust-lang/crates.io-index"
507-
checksum = "d0001adf0cf12361e08b65e1898ea138f8f77d8f5177cbf29b6b3b3532252bd6"
507+
checksum = "d552b2fa341f5fc35c6b917b1d289d3c3a34d0b74e579390ea6192d6152a8cdb"
508508
dependencies = [
509509
"proc-macro2",
510510
"quote",
@@ -514,9 +514,9 @@ dependencies = [
514514

515515
[[package]]
516516
name = "chalk-engine"
517-
version = "0.80.0"
517+
version = "0.87.0"
518518
source = "registry+https://github.com/rust-lang/crates.io-index"
519-
checksum = "c44ee96f2d67cb5193d1503f185db1abad9933a1c6e6b4169c176f90baecd393"
519+
checksum = "7e54ac43048cb31c470d7b3e3acd409090ef4a5abddfe02455187aebc3d6879f"
520520
dependencies = [
521521
"chalk-derive",
522522
"chalk-ir",
@@ -527,9 +527,9 @@ dependencies = [
527527

528528
[[package]]
529529
name = "chalk-ir"
530-
version = "0.80.0"
530+
version = "0.87.0"
531531
source = "registry+https://github.com/rust-lang/crates.io-index"
532-
checksum = "92d8a95548f23618fda86426e4304e563ec2bb7ba0216139f0748d63c107b5f1"
532+
checksum = "43aa55deff4e7fbdb09fa014543372f2c95a06835ac487b9ce57b5099b950838"
533533
dependencies = [
534534
"bitflags",
535535
"chalk-derive",
@@ -538,9 +538,9 @@ dependencies = [
538538

539539
[[package]]
540540
name = "chalk-solve"
541-
version = "0.80.0"
541+
version = "0.87.0"
542542
source = "registry+https://github.com/rust-lang/crates.io-index"
543-
checksum = "f37f492dacfafe2e21319b80827da2779932909bb392f0cc86b2bd5c07c1b4e1"
543+
checksum = "61213deefc36ba265ad01c4d997e18bcddf7922862a4594a47ca4575afb3dab4"
544544
dependencies = [
545545
"chalk-derive",
546546
"chalk-ir",

LICENSES/BSD-2-Clause.txt

Lines changed: 0 additions & 9 deletions
This file was deleted.

compiler/rustc_ast/src/ast.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1208,7 +1208,7 @@ impl Expr {
12081208
ExprKind::Tup(_) => ExprPrecedence::Tup,
12091209
ExprKind::Binary(op, ..) => ExprPrecedence::Binary(op.node),
12101210
ExprKind::Unary(..) => ExprPrecedence::Unary,
1211-
ExprKind::Lit(_) => ExprPrecedence::Lit,
1211+
ExprKind::Lit(_) | ExprKind::IncludedBytes(..) => ExprPrecedence::Lit,
12121212
ExprKind::Type(..) | ExprKind::Cast(..) => ExprPrecedence::Cast,
12131213
ExprKind::Let(..) => ExprPrecedence::Let,
12141214
ExprKind::If(..) => ExprPrecedence::If,
@@ -1446,6 +1446,12 @@ pub enum ExprKind {
14461446
/// with an optional value to be returned.
14471447
Yeet(Option<P<Expr>>),
14481448

1449+
/// Bytes included via `include_bytes!`
1450+
/// Added for optimization purposes to avoid the need to escape
1451+
/// large binary blobs - should always behave like [`ExprKind::Lit`]
1452+
/// with a `ByteStr` literal.
1453+
IncludedBytes(Lrc<[u8]>),
1454+
14491455
/// Placeholder for an expression that wasn't syntactically well formed in some way.
14501456
Err,
14511457
}

compiler/rustc_ast/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ extern crate rustc_macros;
2929
extern crate tracing;
3030

3131
pub mod util {
32+
pub mod case;
3233
pub mod classify;
3334
pub mod comments;
3435
pub mod literal;

compiler/rustc_ast/src/mut_visit.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1428,7 +1428,7 @@ pub fn noop_visit_expr<T: MutVisitor>(
14281428
}
14291429
ExprKind::Try(expr) => vis.visit_expr(expr),
14301430
ExprKind::TryBlock(body) => vis.visit_block(body),
1431-
ExprKind::Lit(_) | ExprKind::Err => {}
1431+
ExprKind::Lit(_) | ExprKind::IncludedBytes(..) | ExprKind::Err => {}
14321432
}
14331433
vis.visit_id(id);
14341434
vis.visit_span(span);

compiler/rustc_ast/src/token.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ pub use TokenKind::*;
55

66
use crate::ast;
77
use crate::ptr::P;
8+
use crate::util::case::Case;
89

910
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
1011
use rustc_data_structures::sync::Lrc;
@@ -615,6 +616,15 @@ impl Token {
615616
self.is_non_raw_ident_where(|id| id.name == kw)
616617
}
617618

619+
/// Returns `true` if the token is a given keyword, `kw` or if `case` is `Insensitive` and this token is an identifier equal to `kw` ignoring the case.
620+
pub fn is_keyword_case(&self, kw: Symbol, case: Case) -> bool {
621+
self.is_keyword(kw)
622+
|| (case == Case::Insensitive
623+
&& self.is_non_raw_ident_where(|id| {
624+
id.name.as_str().to_lowercase() == kw.as_str().to_lowercase()
625+
}))
626+
}
627+
618628
pub fn is_path_segment_keyword(&self) -> bool {
619629
self.is_non_raw_ident_where(Ident::is_path_segment_keyword)
620630
}

compiler/rustc_ast/src/util/case.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/// Whatever to ignore case (`fn` vs `Fn` vs `FN`) or not. Used for recovering.
2+
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
3+
pub enum Case {
4+
Sensitive,
5+
Insensitive,
6+
}

0 commit comments

Comments
 (0)