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 10 pull requests #77222

Closed
wants to merge 39 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
73ada2d
Explicitly document the size guarantees that Option makes.
ltratt Aug 12, 2020
f5118a5
Clarify and add guarantee about `transmute`.
ltratt Aug 12, 2020
83f47aa
Be clear about the reverse `transmute` guarantees.
ltratt Aug 12, 2020
f3d7196
Be clearer about Some/None transmute.
ltratt Aug 12, 2020
8cb8955
Change notation.
ltratt Aug 12, 2020
55802e3
Add Rust function pointers.
ltratt Aug 12, 2020
68209c3
Rename the types for clarity.
ltratt Aug 17, 2020
9bac577
Grammar tweak.
ltratt Aug 17, 2020
2ac89ff
Point at named argument not found when using `format_args_capture` in…
estebank Sep 8, 2020
45d92b4
merge `need_type_info_err(_const)`
lcnr Sep 23, 2020
0abb1ab
unused path
lcnr Sep 23, 2020
3dbfdb0
use the correct span when dealing with inference variables
lcnr Sep 23, 2020
0e84b61
use relevant span when unifying `ConstVarValue`s
lcnr Sep 23, 2020
12ada5c
Remove TrustedLen requirement from BuilderMethods::switch
est31 Sep 24, 2020
47843f5
update Miri
RalfJung Sep 24, 2020
e5430e5
the two hardest things in programming, names and...
lcnr Sep 24, 2020
ff7009a
nit
lcnr Sep 24, 2020
0d2521a
Add `const_fn_floating_point_arithmetic`
ecstatic-morse Sep 23, 2020
2049052
Put floating point arithmetic behind its own feature gate
ecstatic-morse Sep 23, 2020
6a52c09
Add new feature gate to standard library
ecstatic-morse Sep 23, 2020
b428f28
Bless tests
ecstatic-morse Sep 23, 2020
4cac90c
Move const fn floating point test out of `min_const_fn`
ecstatic-morse Sep 23, 2020
659028f
Use proper issue for `const_fn_floating_point_arithmetic`
ecstatic-morse Sep 23, 2020
187162e
Add missing code examples on slice iter types
GuillaumeGomez Sep 22, 2020
900daba
Remove stray word from `ClosureKind::extends` docs
LingMan Sep 25, 2020
aa6a2f4
Rename `whence` to `span`
camelid Sep 25, 2020
12187b7
Remove unused #[allow(...)] statements from compiler/
est31 Sep 25, 2020
32195ac
rename functions
lcnr Sep 26, 2020
9a607c0
unused into
lcnr Sep 26, 2020
2b53e01
Rollup merge of #75454 - ltratt:option_optimisation_guarantees, r=dto…
RalfJung Sep 26, 2020
bc9c67f
Rollup merge of #76485 - estebank:format_arg_capture_spans, r=davidtwco
RalfJung Sep 26, 2020
6e54446
Rollup merge of #77076 - GuillaumeGomez:missing-code-examples-slice-i…
RalfJung Sep 26, 2020
04c4696
Rollup merge of #77093 - lcnr:const-generics-infer-warning, r=varkor
RalfJung Sep 26, 2020
273317d
Rollup merge of #77122 - ecstatic-morse:const-fn-arithmetic, r=RalfJu…
RalfJung Sep 26, 2020
2007588
Rollup merge of #77161 - est31:swich_len_already_trusted, r=petrochenkov
RalfJung Sep 26, 2020
fbbcd57
Rollup merge of #77166 - RalfJung:miri, r=RalfJung
RalfJung Sep 26, 2020
41a3106
Rollup merge of #77204 - LingMan:patch-3, r=jonas-schievink
RalfJung Sep 26, 2020
6b62525
Rollup merge of #77207 - camelid:whence-to-span, r=jyn514
RalfJung Sep 26, 2020
644b592
Rollup merge of #77211 - est31:remove_unused_allow, r=oli-obk
RalfJung Sep 26, 2020
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
1 change: 0 additions & 1 deletion compiler/rustc_arena/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#![feature(new_uninit)]
#![feature(maybe_uninit_slice)]
#![cfg_attr(test, feature(test))]
#![allow(deprecated)]

use rustc_data_structures::cold_path;
use smallvec::SmallVec;
Expand Down
9 changes: 6 additions & 3 deletions compiler/rustc_builtin_macros/src/format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -543,9 +543,12 @@ impl<'a, 'b> Context<'a, 'b> {
let idx = self.args.len();
self.arg_types.push(Vec::new());
self.arg_unique_types.push(Vec::new());
self.args.push(
self.ecx.expr_ident(self.fmtsp, Ident::new(name, self.fmtsp)),
);
let span = if self.is_literal {
*self.arg_spans.get(self.curpiece).unwrap_or(&self.fmtsp)
} else {
self.fmtsp
};
self.args.push(self.ecx.expr_ident(span, Ident::new(name, span)));
self.names.insert(name, idx);
self.verify_arg_type(Exact(idx), ty)
} else {
Expand Down
4 changes: 1 addition & 3 deletions compiler/rustc_codegen_llvm/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ use rustc_target::abi::{self, Align, Size};
use rustc_target::spec::{HasTargetSpec, Target};
use std::borrow::Cow;
use std::ffi::CStr;
use std::iter::TrustedLen;
use std::ops::{Deref, Range};
use std::ptr;
use tracing::debug;
Expand Down Expand Up @@ -179,7 +178,7 @@ impl BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> {
&mut self,
v: &'ll Value,
else_llbb: &'ll BasicBlock,
cases: impl ExactSizeIterator<Item = (u128, &'ll BasicBlock)> + TrustedLen,
cases: impl ExactSizeIterator<Item = (u128, &'ll BasicBlock)>,
) {
let switch =
unsafe { llvm::LLVMBuildSwitch(self.llbuilder, v, else_llbb, cases.len() as c_uint) };
Expand Down Expand Up @@ -931,7 +930,6 @@ impl BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> {
unsafe { llvm::LLVMBuildSelect(self.llbuilder, cond, then_val, else_val, UNNAMED) }
}

#[allow(dead_code)]
fn va_arg(&mut self, list: &'ll Value, ty: &'ll Type) -> &'ll Value {
unsafe { llvm::LLVMBuildVAArg(self.llbuilder, list, ty, UNNAMED) }
}
Expand Down
2 changes: 0 additions & 2 deletions compiler/rustc_codegen_llvm/src/common.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![allow(non_camel_case_types, non_snake_case)]

//! Code that is useful in various codegen modules.

use crate::consts::{self, const_alloc_to_llvm};
Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1845,7 +1845,6 @@ impl<'tcx> VariantInfo<'_, 'tcx> {
None
}

#[allow(dead_code)]
fn is_artificial(&self) -> bool {
match self {
VariantInfo::Generator { .. } => true,
Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_codegen_llvm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#![feature(in_band_lifetimes)]
#![feature(nll)]
#![feature(or_patterns)]
#![feature(trusted_len)]
#![recursion_limit = "256"]

use back::write::{create_informational_target_machine, create_target_machine};
Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_codegen_llvm/src/va_arg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ use rustc_middle::ty::layout::HasTyCtxt;
use rustc_middle::ty::Ty;
use rustc_target::abi::{Align, HasDataLayout, LayoutOf, Size};

#[allow(dead_code)]
fn round_pointer_up_to_alignment(
bx: &mut Builder<'a, 'll, 'tcx>,
addr: &'ll Value,
Expand Down
4 changes: 1 addition & 3 deletions compiler/rustc_codegen_ssa/src/common.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![allow(non_camel_case_types, non_snake_case)]
#![allow(non_camel_case_types)]

use rustc_errors::struct_span_err;
use rustc_hir as hir;
Expand All @@ -25,7 +25,6 @@ pub enum IntPredicate {
IntSLE,
}

#[allow(dead_code)]
pub enum RealPredicate {
RealPredicateFalse,
RealOEQ,
Expand Down Expand Up @@ -60,7 +59,6 @@ pub enum AtomicRmwBinOp {
}

pub enum AtomicOrdering {
#[allow(dead_code)]
NotAtomic,
Unordered,
Monotonic,
Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_codegen_ssa/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#![feature(in_band_lifetimes)]
#![feature(nll)]
#![feature(or_patterns)]
#![feature(trusted_len)]
#![feature(associated_type_bounds)]
#![recursion_limit = "256"]

Expand Down
3 changes: 1 addition & 2 deletions compiler/rustc_codegen_ssa/src/traits/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ use rustc_middle::ty::Ty;
use rustc_target::abi::{Abi, Align, Scalar, Size};
use rustc_target::spec::HasTargetSpec;

use std::iter::TrustedLen;
use std::ops::Range;

#[derive(Copy, Clone)]
Expand Down Expand Up @@ -60,7 +59,7 @@ pub trait BuilderMethods<'a, 'tcx>:
&mut self,
v: Self::Value,
else_llbb: Self::BasicBlock,
cases: impl ExactSizeIterator<Item = (u128, Self::BasicBlock)> + TrustedLen,
cases: impl ExactSizeIterator<Item = (u128, Self::BasicBlock)>,
);
fn invoke(
&mut self,
Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_data_structures/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
//! This API is completely unstable and subject to change.

#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
#![allow(incomplete_features)]
#![feature(array_windows)]
#![feature(control_flow_enum)]
#![feature(in_band_lifetimes)]
Expand Down
3 changes: 3 additions & 0 deletions compiler/rustc_feature/src/active.rs
Original file line number Diff line number Diff line change
Expand Up @@ -584,6 +584,9 @@ declare_features! (
/// Allows non trivial generic constants which have to be manually propageted upwards.
(active, const_evaluatable_checked, "1.48.0", Some(76560), None),

/// Allows basic arithmetic on floating point types in a `const fn`.
(active, const_fn_floating_point_arithmetic, "1.48.0", Some(57241), None),

// -------------------------------------------------------------------------
// feature-group-end: actual feature gates
// -------------------------------------------------------------------------
Expand Down
3 changes: 0 additions & 3 deletions compiler/rustc_hir/src/intravisit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,6 @@ pub trait Visitor<'v>: Sized {
/// patterns described on `itemlikevisit::ItemLikeVisitor`. The only
/// reason to override this method is if you want a nested pattern
/// but cannot supply a `Map`; see `nested_visit_map` for advice.
#[allow(unused_variables)]
fn visit_nested_item(&mut self, id: ItemId) {
let opt_item = self.nested_visit_map().inter().map(|map| map.item(id.id));
walk_list!(self, visit_item, opt_item);
Expand All @@ -265,7 +264,6 @@ pub trait Visitor<'v>: Sized {
/// Like `visit_nested_item()`, but for trait items. See
/// `visit_nested_item()` for advice on when to override this
/// method.
#[allow(unused_variables)]
fn visit_nested_trait_item(&mut self, id: TraitItemId) {
let opt_item = self.nested_visit_map().inter().map(|map| map.trait_item(id));
walk_list!(self, visit_trait_item, opt_item);
Expand All @@ -274,7 +272,6 @@ pub trait Visitor<'v>: Sized {
/// Like `visit_nested_item()`, but for impl items. See
/// `visit_nested_item()` for advice on when to override this
/// method.
#[allow(unused_variables)]
fn visit_nested_impl_item(&mut self, id: ImplItemId) {
let opt_item = self.nested_visit_map().inter().map(|map| map.impl_item(id));
walk_list!(self, visit_impl_item, opt_item);
Expand Down
Loading