Skip to content

Commit 7c4ac06

Browse files
committed
Auto merge of #124752 - GuillaumeGomez:rollup-a4qagbd, r=GuillaumeGomez
Rollup of 6 pull requests Successful merges: - #124148 (rustdoc-search: search for references) - #124668 (Fix bootstrap panic when build from tarball) - #124736 (compiler: upgrade time from 0.3.34 to 0.3.36) - #124748 (Fix unwinding on 32-bit watchOS ARM (v2)) - #124749 (Stabilize exclusive_range_pattern (v2)) - #124750 (Document That `f16` And `f128` Hardware Support is Limited (v2)) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 06e88c3 + 4eedf73 commit 7c4ac06

File tree

98 files changed

+1281
-741
lines changed

Some content is hidden

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

98 files changed

+1281
-741
lines changed

Cargo.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5597,9 +5597,9 @@ version = "0.1.0"
55975597

55985598
[[package]]
55995599
name = "time"
5600-
version = "0.3.34"
5600+
version = "0.3.36"
56015601
source = "registry+https://github.com/rust-lang/crates.io-index"
5602-
checksum = "c8248b6521bb14bc45b4067159b9b6ad792e2d6d754d6c41fb50e29fefe38749"
5602+
checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885"
56035603
dependencies = [
56045604
"deranged",
56055605
"itoa",
@@ -5618,9 +5618,9 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3"
56185618

56195619
[[package]]
56205620
name = "time-macros"
5621-
version = "0.2.17"
5621+
version = "0.2.18"
56225622
source = "registry+https://github.com/rust-lang/crates.io-index"
5623-
checksum = "7ba3a3ef41e6672a2f0f001392bb5dcd3ff0a9992d618ca761a11c3121547774"
5623+
checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf"
56245624
dependencies = [
56255625
"num-conv",
56265626
"time-core",

compiler/rustc_ast_passes/src/feature_gate.rs

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use rustc_ast as ast;
22
use rustc_ast::visit::{self, AssocCtxt, FnCtxt, FnKind, Visitor};
33
use rustc_ast::{attr, AssocConstraint, AssocConstraintKind, NodeId};
4-
use rustc_ast::{token, PatKind, RangeEnd};
4+
use rustc_ast::{token, PatKind};
55
use rustc_feature::{AttributeGate, BuiltinAttribute, Features, GateIssue, BUILTIN_ATTRIBUTE_MAP};
66
use rustc_session::parse::{feature_err, feature_err_issue, feature_warn};
77
use rustc_session::Session;
@@ -418,15 +418,6 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {
418418
PatKind::Box(..) => {
419419
gate!(&self, box_patterns, pattern.span, "box pattern syntax is experimental");
420420
}
421-
PatKind::Range(_, Some(_), Spanned { node: RangeEnd::Excluded, .. }) => {
422-
gate!(
423-
&self,
424-
exclusive_range_pattern,
425-
pattern.span,
426-
"exclusive range pattern syntax is experimental",
427-
"use an inclusive range pattern, like N..=M"
428-
);
429-
}
430421
_ => {}
431422
}
432423
visit::walk_pat(self, pattern)
@@ -619,10 +610,6 @@ pub fn check_crate(krate: &ast::Crate, sess: &Session, features: &Features) {
619610
// be too.
620611
gate_all_legacy_dont_use!(return_type_notation, "return type notation is experimental");
621612
gate_all_legacy_dont_use!(decl_macro, "`macro` is experimental");
622-
gate_all_legacy_dont_use!(
623-
exclusive_range_pattern,
624-
"exclusive range pattern syntax is experimental"
625-
);
626613
gate_all_legacy_dont_use!(try_blocks, "`try` blocks are unstable");
627614
gate_all_legacy_dont_use!(auto_traits, "`auto` traits are unstable");
628615

compiler/rustc_driver_impl/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ rustc_trait_selection = { path = "../rustc_trait_selection" }
4949
rustc_ty_utils = { path = "../rustc_ty_utils" }
5050
serde_json = "1.0.59"
5151
shlex = "1.0"
52-
time = { version = "0.3", default-features = false, features = ["alloc", "formatting", "parsing", "macros"] }
52+
time = { version = "0.3.36", default-features = false, features = ["alloc", "formatting", "parsing", "macros"] }
5353
tracing = { version = "0.1.35" }
5454
# tidy-alphabetical-end
5555

compiler/rustc_error_codes/src/error_codes/E0579.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ A lower range wasn't less than the upper range.
33
Erroneous code example:
44

55
```compile_fail,E0579
6-
#![feature(exclusive_range_pattern)]
76
87
fn main() {
98
match 5u32 {

compiler/rustc_feature/src/accepted.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,8 @@ declare_features! (
162162
(accepted, drop_types_in_const, "1.22.0", Some(33156)),
163163
/// Allows using `dyn Trait` as a syntax for trait objects.
164164
(accepted, dyn_trait, "1.27.0", Some(44662)),
165+
/// Allows `X..Y` patterns.
166+
(accepted, exclusive_range_pattern, "CURRENT_RUSTC_VERSION", Some(37854)),
165167
/// Allows integer match exhaustiveness checking (RFC 2591).
166168
(accepted, exhaustive_integer_patterns, "1.33.0", Some(50907)),
167169
/// Allows explicit generic arguments specification with `impl Trait` present.

compiler/rustc_feature/src/unstable.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -454,8 +454,6 @@ declare_features! (
454454
(incomplete, dyn_star, "1.65.0", Some(102425)),
455455
/// Uses generic effect parameters for ~const bounds
456456
(unstable, effects, "1.72.0", Some(102090)),
457-
/// Allows `X..Y` patterns.
458-
(unstable, exclusive_range_pattern, "1.11.0", Some(37854)),
459457
/// Allows exhaustive pattern matching on types that contain uninhabited types.
460458
(unstable, exhaustive_patterns, "1.13.0", Some(51085)),
461459
/// Allows explicit tail calls via `become` expression.

compiler/rustc_lint_defs/src/builtin.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -844,7 +844,6 @@ declare_lint! {
844844
/// ### Example
845845
///
846846
/// ```rust
847-
/// # #![feature(exclusive_range_pattern)]
848847
/// let x = 123u32;
849848
/// match x {
850849
/// 0..100 => { println!("small"); }

compiler/rustc_pattern_analysis/src/usefulness.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
//! This is enough to compute usefulness: a pattern in a `match` expression is redundant iff it is
4343
//! not useful w.r.t. the patterns above it:
4444
//! ```compile_fail,E0004
45-
//! # #![feature(exclusive_range_pattern)]
4645
//! # fn foo() {
4746
//! match Some(0u32) {
4847
//! Some(0..100) => {},

library/alloc/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@
165165
//
166166
// Language features:
167167
// tidy-alphabetical-start
168+
#![cfg_attr(bootstrap, feature(exclusive_range_pattern))]
168169
#![cfg_attr(not(test), feature(coroutine_trait))]
169170
#![cfg_attr(test, feature(panic_update_hook))]
170171
#![cfg_attr(test, feature(test))]
@@ -179,7 +180,6 @@
179180
#![feature(const_try)]
180181
#![feature(decl_macro)]
181182
#![feature(dropck_eyepatch)]
182-
#![feature(exclusive_range_pattern)]
183183
#![feature(fundamental)]
184184
#![feature(hashmap_internals)]
185185
#![feature(lang_items)]

library/core/src/primitive_docs.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1133,6 +1133,12 @@ impl<T> (T,) {}
11331133
/// bits. Please see [the documentation for [`prim@f32`] or [Wikipedia on
11341134
/// half-precision values][wikipedia] for more information.
11351135
///
1136+
/// Note that most common platforms will not support `f16` in hardware without enabling extra target
1137+
/// features, with the notable exception of Apple Silicon (also known as M1, M2, etc.) processors.
1138+
/// Hardware support on x86-64 requires the avx512fp16 feature, while RISC-V requires Zhf.
1139+
/// Usually the fallback implementation will be to use `f32` hardware if it exists, and convert
1140+
/// between `f16` and `f32` when performing math.
1141+
///
11361142
/// *[See also the `std::f16::consts` module](crate::f16::consts).*
11371143
///
11381144
/// [wikipedia]: https://en.wikipedia.org/wiki/Half-precision_floating-point_format
@@ -1232,6 +1238,12 @@ mod prim_f64 {}
12321238
/// as many bits as `f64`. Please see [the documentation for [`prim@f32`] or [Wikipedia on
12331239
/// quad-precision values][wikipedia] for more information.
12341240
///
1241+
/// Note that no platforms have hardware support for `f128` without enabling target specific features,
1242+
/// as for all instruction set architectures `f128` is considered an optional feature.
1243+
/// Only Power ISA ("PowerPC") and RISCV specify it, and only certain microarchitectures
1244+
/// actually implement it. For x86-64 and AArch64, ISA support is not even specified,
1245+
/// so it will always be a software implementation significantly slower than `f64`.
1246+
///
12351247
/// *[See also the `std::f128::consts` module](crate::f128::consts).*
12361248
///
12371249
/// [wikipedia]: https://en.wikipedia.org/wiki/Quadruple-precision_floating-point_format

0 commit comments

Comments
 (0)