Skip to content

Commit e37c99f

Browse files
committed
Auto merge of rust-lang#77224 - RalfJung:rollup-hdvb96c, r=RalfJung
Rollup of 12 pull requests Successful merges: - rust-lang#75454 (Explicitly document the size guarantees that Option makes.) - rust-lang#76631 (Add `x.py setup`) - rust-lang#77076 (Add missing code examples on slice iter types) - rust-lang#77093 (merge `need_type_info_err(_const)`) - rust-lang#77122 (Add `#![feature(const_fn_floating_point_arithmetic)]`) - rust-lang#77127 (Update mdBook) - rust-lang#77161 (Remove TrustedLen requirement from BuilderMethods::switch) - rust-lang#77166 (update Miri) - rust-lang#77181 (Add doc alias for pointer primitive) - rust-lang#77204 (Remove stray word from `ClosureKind::extends` docs) - rust-lang#77207 (Rename `whence` to `span`) - rust-lang#77211 (Remove unused #[allow(...)] statements from compiler/) Failed merges: - rust-lang#77170 (Remove `#[rustc_allow_const_fn_ptr]` and add `#![feature(const_fn_fn_ptr_basics)]`) r? `@ghost`
2 parents 6f9a8a7 + 9e02642 commit e37c99f

File tree

74 files changed

+809
-343
lines changed

Some content is hidden

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

74 files changed

+809
-343
lines changed

Cargo.lock

+2-2
Original file line numberDiff line numberDiff line change
@@ -1848,9 +1848,9 @@ dependencies = [
18481848

18491849
[[package]]
18501850
name = "mdbook"
1851-
version = "0.4.2"
1851+
version = "0.4.3"
18521852
source = "registry+https://github.com/rust-lang/crates.io-index"
1853-
checksum = "b75e31ae4eaa0e45e17ee2b6b9e3ed969c3c6ff12bb4c2e352c42493f4ebb706"
1853+
checksum = "29be448fcafb00c5a8966c4020c2a5ffbbc333e5b96d0bb5ef54b5bd0524d9ff"
18541854
dependencies = [
18551855
"ammonia",
18561856
"anyhow",

compiler/rustc_arena/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
#![feature(new_uninit)]
1616
#![feature(maybe_uninit_slice)]
1717
#![cfg_attr(test, feature(test))]
18-
#![allow(deprecated)]
1918

2019
use rustc_data_structures::cold_path;
2120
use smallvec::SmallVec;

compiler/rustc_codegen_llvm/src/builder.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ use rustc_target::abi::{self, Align, Size};
2121
use rustc_target::spec::{HasTargetSpec, Target};
2222
use std::borrow::Cow;
2323
use std::ffi::CStr;
24-
use std::iter::TrustedLen;
2524
use std::ops::{Deref, Range};
2625
use std::ptr;
2726
use tracing::debug;
@@ -179,7 +178,7 @@ impl BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> {
179178
&mut self,
180179
v: &'ll Value,
181180
else_llbb: &'ll BasicBlock,
182-
cases: impl ExactSizeIterator<Item = (u128, &'ll BasicBlock)> + TrustedLen,
181+
cases: impl ExactSizeIterator<Item = (u128, &'ll BasicBlock)>,
183182
) {
184183
let switch =
185184
unsafe { llvm::LLVMBuildSwitch(self.llbuilder, v, else_llbb, cases.len() as c_uint) };
@@ -931,7 +930,6 @@ impl BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> {
931930
unsafe { llvm::LLVMBuildSelect(self.llbuilder, cond, then_val, else_val, UNNAMED) }
932931
}
933932

934-
#[allow(dead_code)]
935933
fn va_arg(&mut self, list: &'ll Value, ty: &'ll Type) -> &'ll Value {
936934
unsafe { llvm::LLVMBuildVAArg(self.llbuilder, list, ty, UNNAMED) }
937935
}

compiler/rustc_codegen_llvm/src/common.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![allow(non_camel_case_types, non_snake_case)]
2-
31
//! Code that is useful in various codegen modules.
42
53
use crate::consts::{self, const_alloc_to_llvm};

compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1845,7 +1845,6 @@ impl<'tcx> VariantInfo<'_, 'tcx> {
18451845
None
18461846
}
18471847

1848-
#[allow(dead_code)]
18491848
fn is_artificial(&self) -> bool {
18501849
match self {
18511850
VariantInfo::Generator { .. } => true,

compiler/rustc_codegen_llvm/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
#![feature(in_band_lifetimes)]
1313
#![feature(nll)]
1414
#![feature(or_patterns)]
15-
#![feature(trusted_len)]
1615
#![recursion_limit = "256"]
1716

1817
use back::write::{create_informational_target_machine, create_target_machine};

compiler/rustc_codegen_llvm/src/va_arg.rs

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ use rustc_middle::ty::layout::HasTyCtxt;
1111
use rustc_middle::ty::Ty;
1212
use rustc_target::abi::{Align, HasDataLayout, LayoutOf, Size};
1313

14-
#[allow(dead_code)]
1514
fn round_pointer_up_to_alignment(
1615
bx: &mut Builder<'a, 'll, 'tcx>,
1716
addr: &'ll Value,

compiler/rustc_codegen_ssa/src/common.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![allow(non_camel_case_types, non_snake_case)]
1+
#![allow(non_camel_case_types)]
22

33
use rustc_errors::struct_span_err;
44
use rustc_hir as hir;
@@ -25,7 +25,6 @@ pub enum IntPredicate {
2525
IntSLE,
2626
}
2727

28-
#[allow(dead_code)]
2928
pub enum RealPredicate {
3029
RealPredicateFalse,
3130
RealOEQ,
@@ -60,7 +59,6 @@ pub enum AtomicRmwBinOp {
6059
}
6160

6261
pub enum AtomicOrdering {
63-
#[allow(dead_code)]
6462
NotAtomic,
6563
Unordered,
6664
Monotonic,

compiler/rustc_codegen_ssa/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
#![feature(in_band_lifetimes)]
77
#![feature(nll)]
88
#![feature(or_patterns)]
9-
#![feature(trusted_len)]
109
#![feature(associated_type_bounds)]
1110
#![recursion_limit = "256"]
1211

compiler/rustc_codegen_ssa/src/traits/builder.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ use rustc_middle::ty::Ty;
1818
use rustc_target::abi::{Abi, Align, Scalar, Size};
1919
use rustc_target::spec::HasTargetSpec;
2020

21-
use std::iter::TrustedLen;
2221
use std::ops::Range;
2322

2423
#[derive(Copy, Clone)]
@@ -60,7 +59,7 @@ pub trait BuilderMethods<'a, 'tcx>:
6059
&mut self,
6160
v: Self::Value,
6261
else_llbb: Self::BasicBlock,
63-
cases: impl ExactSizeIterator<Item = (u128, Self::BasicBlock)> + TrustedLen,
62+
cases: impl ExactSizeIterator<Item = (u128, Self::BasicBlock)>,
6463
);
6564
fn invoke(
6665
&mut self,

compiler/rustc_data_structures/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
//! This API is completely unstable and subject to change.
88
99
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
10-
#![allow(incomplete_features)]
1110
#![feature(array_windows)]
1211
#![feature(control_flow_enum)]
1312
#![feature(in_band_lifetimes)]

compiler/rustc_feature/src/active.rs

+3
Original file line numberDiff line numberDiff line change
@@ -584,6 +584,9 @@ declare_features! (
584584
/// Allows non trivial generic constants which have to be manually propageted upwards.
585585
(active, const_evaluatable_checked, "1.48.0", Some(76560), None),
586586

587+
/// Allows basic arithmetic on floating point types in a `const fn`.
588+
(active, const_fn_floating_point_arithmetic, "1.48.0", Some(57241), None),
589+
587590
// -------------------------------------------------------------------------
588591
// feature-group-end: actual feature gates
589592
// -------------------------------------------------------------------------

compiler/rustc_hir/src/intravisit.rs

-3
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,6 @@ pub trait Visitor<'v>: Sized {
256256
/// patterns described on `itemlikevisit::ItemLikeVisitor`. The only
257257
/// reason to override this method is if you want a nested pattern
258258
/// but cannot supply a `Map`; see `nested_visit_map` for advice.
259-
#[allow(unused_variables)]
260259
fn visit_nested_item(&mut self, id: ItemId) {
261260
let opt_item = self.nested_visit_map().inter().map(|map| map.item(id.id));
262261
walk_list!(self, visit_item, opt_item);
@@ -265,7 +264,6 @@ pub trait Visitor<'v>: Sized {
265264
/// Like `visit_nested_item()`, but for trait items. See
266265
/// `visit_nested_item()` for advice on when to override this
267266
/// method.
268-
#[allow(unused_variables)]
269267
fn visit_nested_trait_item(&mut self, id: TraitItemId) {
270268
let opt_item = self.nested_visit_map().inter().map(|map| map.trait_item(id));
271269
walk_list!(self, visit_trait_item, opt_item);
@@ -274,7 +272,6 @@ pub trait Visitor<'v>: Sized {
274272
/// Like `visit_nested_item()`, but for impl items. See
275273
/// `visit_nested_item()` for advice on when to override this
276274
/// method.
277-
#[allow(unused_variables)]
278275
fn visit_nested_impl_item(&mut self, id: ImplItemId) {
279276
let opt_item = self.nested_visit_map().inter().map(|map| map.impl_item(id));
280277
walk_list!(self, visit_impl_item, opt_item);

0 commit comments

Comments
 (0)