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 8 pull requests #81674

Closed
wants to merge 28 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
8afe598
Add big-endian support for AArch64 va_arg
Jan 20, 2021
d53b0a0
Fix ARM and AArch64 calling convention for passing small composite types
Jan 20, 2021
06f14df
Support AArch64 ILP32 in libunwind bindings
Jan 20, 2021
a112c4d
Support AArch64 big-endian and ILP32 in compiletest
Jan 20, 2021
8783d1a
Add big-endian and ILP32 AArch64 targets
Jan 20, 2021
69e6326
Add new aarch64 targets to platform-support.md
Jan 26, 2021
5307230
Bump LLVM submodule
Jan 21, 2021
4b64bc1
Upgrade Chalk
jackh726 Jan 1, 2021
b35d601
Directly use `Option<&[T]>` instead of converting from `Option<&Vec<T…
LingMan Feb 1, 2021
6f90365
Add lint for `panic!(123)` which is not accepted in Rust 2021.
m-ou-se Feb 1, 2021
91a9866
Make panic/assert calls in rustc compatible with Rust 2021.
m-ou-se Feb 1, 2021
c3dedd0
Upgrade libc to 0.2.85
Jan 21, 2021
3408c58
Fix AArch64 types in std::os::raw
Amanieu Feb 1, 2021
bad0f28
Improve wording of suggestion about accessing field
hkmatsumoto Feb 2, 2021
535f487
Allow/fix non_fmt_panic in tests.
m-ou-se Feb 1, 2021
717355d
Update panic!() documentation about non-string panics.
m-ou-se Feb 2, 2021
07c4eeb
Fix out of date `Scalar` documentation
jacob-hughes Feb 2, 2021
6525671
Add better diagnostic for missing where clause
JulianKnodt Jan 30, 2021
ae3164e
Add .editorconfig
vn971 Jan 22, 2021
a0622d6
Update Chalk
jackh726 Jan 31, 2021
9cbd231
Rollup merge of #80593 - jackh726:chalk-upgrade, r=nikomatsakis
m-ou-se Feb 2, 2021
aed63da
Rollup merge of #81260 - vn971:restore-editorconfig, r=Mark-Simulacrum
m-ou-se Feb 2, 2021
a262bc1
Rollup merge of #81455 - Amanieu:aarch64_ilp32, r=sanxiyn
m-ou-se Feb 2, 2021
7fa357d
Rollup merge of #81544 - JulianKnodt:sat_where, r=lcnr
m-ou-se Feb 2, 2021
2a41f20
Rollup merge of #81636 - LingMan:slice_not_vec, r=petrochenkov
m-ou-se Feb 2, 2021
132f55c
Rollup merge of #81645 - m-ou-se:panic-lint, r=estebank
m-ou-se Feb 2, 2021
0513708
Rollup merge of #81655 - matsujika:suggest-accessing-field-rewording,…
m-ou-se Feb 2, 2021
ddf8dc7
Rollup merge of #81665 - jacob-hughes:mir_doc_fix, r=estebank
m-ou-se Feb 2, 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
21 changes: 21 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# editorconfig.org

root = true

[*]
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space
indent_size = 4

[*.md]
# double whitespace at end of line
# denotes a line break in Markdown
trim_trailing_whitespace = false

[*.yml]
indent_size = 2
22 changes: 12 additions & 10 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -496,9 +496,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"

[[package]]
name = "chalk-derive"
version = "0.36.0"
version = "0.55.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9f88ce4deae1dace71e49b7611cfae2d5489de3530d6daba5758043c47ac3a10"
checksum = "3983193cacd81f0f924acb666b7fe5e1a0d81db9f113fa69203eda7ea8ce8b6c"
dependencies = [
"proc-macro2",
"quote",
Expand All @@ -508,9 +508,9 @@ dependencies = [

[[package]]
name = "chalk-engine"
version = "0.36.0"
version = "0.55.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0e34c9b1b10616782143d7f49490f91ae94afaf2202de3ab0b2835e78b4f0ccc"
checksum = "05a171ce5abbf0fbd06f221ab80ab182c7ef78603d23b858bc44e7ce8a86a396"
dependencies = [
"chalk-derive",
"chalk-ir",
Expand All @@ -521,19 +521,20 @@ dependencies = [

[[package]]
name = "chalk-ir"
version = "0.36.0"
version = "0.55.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "63362c629c2014ab639b04029070763fb8224df136d1363d30e9ece4c8877da3"
checksum = "a522f53af971e7678f472d687e053120157b3ae26e2ebd5ecbc0f5ab124f2cb6"
dependencies = [
"bitflags",
"chalk-derive",
"lazy_static",
]

[[package]]
name = "chalk-solve"
version = "0.36.0"
version = "0.55.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cac338a67af52a7f50bb2f8232e730a3518ce432dbe303246acfe525ddd838c7"
checksum = "cdf79fb77a567e456a170f7ec84ea6584163d4ba3f13660cd182013d34ca667c"
dependencies = [
"chalk-derive",
"chalk-ir",
Expand Down Expand Up @@ -1783,9 +1784,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"

[[package]]
name = "libc"
version = "0.2.79"
version = "0.2.85"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2448f6066e80e3bfc792e9c98bf705b4b0fc6e8ef5b43e5889aff0eaa9c58743"
checksum = "7ccac4b00700875e6a07c6cde370d44d32fa01c5a65cdd2fca6858c479d28bb3"
dependencies = [
"rustc-std-workspace-core",
]
Expand Down Expand Up @@ -4313,6 +4314,7 @@ dependencies = [
"chalk-ir",
"chalk-solve",
"rustc_ast",
"rustc_attr",
"rustc_data_structures",
"rustc_hir",
"rustc_index",
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_ast/src/mut_visit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ pub trait ExpectOne<A: Array> {

impl<A: Array> ExpectOne<A> for SmallVec<A> {
fn expect_one(self, err: &'static str) -> A::Item {
assert!(self.len() == 1, err);
assert!(self.len() == 1, "{}", err);
self.into_iter().next().unwrap()
}
}
Expand Down
12 changes: 8 additions & 4 deletions compiler/rustc_codegen_llvm/src/va_arg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ fn emit_aapcs_va_arg(
let mut end = bx.build_sibling_block("va_arg.end");
let zero = bx.const_i32(0);
let offset_align = Align::from_bytes(4).unwrap();
assert_eq!(bx.tcx().sess.target.endian, Endian::Little);

let gr_type = target_ty.is_any_ptr() || target_ty.is_integral();
let (reg_off, reg_top_index, slot_size) = if gr_type {
Expand Down Expand Up @@ -144,9 +143,14 @@ fn emit_aapcs_va_arg(
let top = in_reg.load(top, bx.tcx().data_layout.pointer_align.abi);

// reg_value = *(@top + reg_off_v);
let top = in_reg.gep(top, &[reg_off_v]);
let top = in_reg.bitcast(top, bx.cx.type_ptr_to(layout.llvm_type(bx)));
let reg_value = in_reg.load(top, layout.align.abi);
let mut reg_addr = in_reg.gep(top, &[reg_off_v]);
if bx.tcx().sess.target.endian == Endian::Big && layout.size.bytes() != slot_size {
// On big-endian systems the value is right-aligned in its slot.
let offset = bx.const_i32((slot_size - layout.size.bytes()) as i32);
reg_addr = in_reg.gep(reg_addr, &[offset]);
}
let reg_addr = in_reg.bitcast(reg_addr, bx.cx.type_ptr_to(layout.llvm_type(bx)));
let reg_value = in_reg.load(reg_addr, layout.align.abi);
in_reg.br(&end.llbb());

// On Stack block
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_errors/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -901,7 +901,7 @@ impl HandlerInner {

fn span_bug(&mut self, sp: impl Into<MultiSpan>, msg: &str) -> ! {
self.emit_diag_at_span(Diagnostic::new(Bug, msg), sp);
panic!(ExplicitBug);
panic::panic_any(ExplicitBug);
}

fn emit_diag_at_span(&mut self, mut diag: Diagnostic, sp: impl Into<MultiSpan>) {
Expand Down Expand Up @@ -955,7 +955,7 @@ impl HandlerInner {

fn bug(&mut self, msg: &str) -> ! {
self.emit_diagnostic(&Diagnostic::new(Bug, msg));
panic!(ExplicitBug);
panic::panic_any(ExplicitBug);
}

fn delay_as_bug(&mut self, diagnostic: Diagnostic) {
Expand Down
12 changes: 4 additions & 8 deletions compiler/rustc_infer/src/infer/canonical/canonicalizer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -353,10 +353,8 @@ impl<'cx, 'tcx> TypeFolder<'tcx> for Canonicalizer<'cx, 'tcx> {
// `TyVar(vid)` is unresolved, track its universe index in the canonicalized
// result.
Err(mut ui) => {
if !self.infcx.unwrap().tcx.sess.opts.debugging_opts.chalk {
// FIXME: perf problem described in #55921.
ui = ty::UniverseIndex::ROOT;
}
// FIXME: perf problem described in #55921.
ui = ty::UniverseIndex::ROOT;
self.canonicalize_ty_var(
CanonicalVarInfo {
kind: CanonicalVarKind::Ty(CanonicalTyVarKind::General(ui)),
Expand Down Expand Up @@ -440,10 +438,8 @@ impl<'cx, 'tcx> TypeFolder<'tcx> for Canonicalizer<'cx, 'tcx> {
// `ConstVar(vid)` is unresolved, track its universe index in the
// canonicalized result
Err(mut ui) => {
if !self.infcx.unwrap().tcx.sess.opts.debugging_opts.chalk {
// FIXME: perf problem described in #55921.
ui = ty::UniverseIndex::ROOT;
}
// FIXME: perf problem described in #55921.
ui = ty::UniverseIndex::ROOT;
return self.canonicalize_const_var(
CanonicalVarInfo { kind: CanonicalVarKind::Const(ui) },
ct,
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_infer/src/infer/error_reporting/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1855,7 +1855,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
diag.span_suggestion(
span,
&format!(
"you might have meant to use field `{}` of type `{}`",
"you might have meant to use field `{}` whose type is `{}`",
name, ty
),
suggestion,
Expand Down
6 changes: 3 additions & 3 deletions compiler/rustc_lint/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ mod late;
mod levels;
mod methods;
mod non_ascii_idents;
mod non_fmt_panic;
mod nonstandard_style;
mod panic_fmt;
mod passes;
mod redundant_semicolon;
mod traits;
Expand All @@ -80,8 +80,8 @@ use builtin::*;
use internal::*;
use methods::*;
use non_ascii_idents::*;
use non_fmt_panic::NonPanicFmt;
use nonstandard_style::*;
use panic_fmt::PanicFmt;
use redundant_semicolon::*;
use traits::*;
use types::*;
Expand Down Expand Up @@ -168,7 +168,7 @@ macro_rules! late_lint_passes {
ClashingExternDeclarations: ClashingExternDeclarations::new(),
DropTraitConstraints: DropTraitConstraints,
TemporaryCStringAsPtr: TemporaryCStringAsPtr,
PanicFmt: PanicFmt,
NonPanicFmt: NonPanicFmt,
]
);
};
Expand Down
Loading