Skip to content

Commit ff014f5

Browse files
committed
Auto merge of #126144 - fmease:rollup-i9pcdys, r=fmease
Rollup of 6 pull requests Successful merges: - #125951 (Stabilize `error_in_core`) - #125998 (std::unix::fs::get_mode implementation for illumos/solaris.) - #126057 (Make html rendered by rustdoc allow searching non-English identifier / alias) - #126065 (mark binding undetermined if target name exist and not obtained) - #126105 (Add debugging utils and comments to Fuchsia scripts) - #126138 (Fix typo in docs for std::pin) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 8fb1930 + 733a6f1 commit ff014f5

File tree

28 files changed

+501
-143
lines changed

28 files changed

+501
-143
lines changed

compiler/rustc_resolve/src/ident.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -998,14 +998,14 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
998998
let Some(module) = single_import.imported_module.get() else {
999999
return Err((Undetermined, Weak::No));
10001000
};
1001-
let ImportKind::Single { source: ident, source_bindings, .. } = &single_import.kind
1001+
let ImportKind::Single { source: ident, target, target_bindings, .. } =
1002+
&single_import.kind
10021003
else {
10031004
unreachable!();
10041005
};
1005-
if binding.map_or(false, |binding| binding.module().is_some())
1006-
&& source_bindings.iter().all(|binding| matches!(binding.get(), Err(Undetermined)))
1007-
{
1008-
// This branch allows the binding to be defined or updated later,
1006+
if (ident != target) && target_bindings.iter().all(|binding| binding.get().is_none()) {
1007+
// This branch allows the binding to be defined or updated later if the target name
1008+
// can hide the source but these bindings are not obtained.
10091009
// avoiding module inconsistency between the resolve process and the finalize process.
10101010
// See more details in #124840
10111011
return Err((Undetermined, Weak::No));

library/alloc/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@
121121
#![feature(deref_pure_trait)]
122122
#![feature(dispatch_from_dyn)]
123123
#![feature(error_generic_member_access)]
124-
#![feature(error_in_core)]
125124
#![feature(exact_size_is_empty)]
126125
#![feature(extend_one)]
127126
#![feature(fmt_internals)]

library/core/src/error.rs

+3-13
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#![doc = include_str!("error.md")]
2-
#![unstable(feature = "error_in_core", issue = "103765")]
2+
#![stable(feature = "error_in_core", since = "CURRENT_RUSTC_VERSION")]
33

44
#[cfg(test)]
55
mod tests;
@@ -130,7 +130,6 @@ pub trait Error: Debug + Display {
130130
///
131131
/// ```rust
132132
/// #![feature(error_generic_member_access)]
133-
/// #![feature(error_in_core)]
134133
/// use core::fmt;
135134
/// use core::error::{request_ref, Request};
136135
///
@@ -361,8 +360,7 @@ impl dyn Error {
361360
/// Get a string value from an error.
362361
///
363362
/// ```rust
364-
/// # #![feature(error_generic_member_access)]
365-
/// # #![feature(error_in_core)]
363+
/// #![feature(error_generic_member_access)]
366364
/// use std::error::Error;
367365
/// use core::error::request_value;
368366
///
@@ -385,8 +383,7 @@ where
385383
/// Get a string reference from an error.
386384
///
387385
/// ```rust
388-
/// # #![feature(error_generic_member_access)]
389-
/// # #![feature(error_in_core)]
386+
/// #![feature(error_generic_member_access)]
390387
/// use core::error::Error;
391388
/// use core::error::request_ref;
392389
///
@@ -458,7 +455,6 @@ where
458455
///
459456
/// ```
460457
/// #![feature(error_generic_member_access)]
461-
/// #![feature(error_in_core)]
462458
/// use core::fmt;
463459
/// use core::error::Request;
464460
/// use core::error::request_ref;
@@ -529,7 +525,6 @@ impl<'a> Request<'a> {
529525
///
530526
/// ```rust
531527
/// #![feature(error_generic_member_access)]
532-
/// #![feature(error_in_core)]
533528
///
534529
/// use core::error::Request;
535530
///
@@ -564,7 +559,6 @@ impl<'a> Request<'a> {
564559
///
565560
/// ```rust
566561
/// #![feature(error_generic_member_access)]
567-
/// #![feature(error_in_core)]
568562
///
569563
/// use core::error::Request;
570564
///
@@ -600,7 +594,6 @@ impl<'a> Request<'a> {
600594
///
601595
/// ```rust
602596
/// #![feature(error_generic_member_access)]
603-
/// #![feature(error_in_core)]
604597
///
605598
/// use core::error::Request;
606599
///
@@ -633,7 +626,6 @@ impl<'a> Request<'a> {
633626
///
634627
/// ```rust
635628
/// #![feature(error_generic_member_access)]
636-
/// #![feature(error_in_core)]
637629
///
638630
/// use core::error::Request;
639631
///
@@ -700,7 +692,6 @@ impl<'a> Request<'a> {
700692
///
701693
/// ```rust
702694
/// #![feature(error_generic_member_access)]
703-
/// #![feature(error_in_core)]
704695
///
705696
/// use core::error::Request;
706697
/// use core::error::request_value;
@@ -788,7 +779,6 @@ impl<'a> Request<'a> {
788779
///
789780
/// ```rust
790781
/// #![feature(error_generic_member_access)]
791-
/// #![feature(error_in_core)]
792782
///
793783
/// use core::error::Request;
794784
/// use core::error::request_ref;

library/core/src/pin.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@
184184
//! requires at least a level of pointer indirection each time a new object is added to the mix
185185
//! (and, practically, a heap allocation).
186186
//!
187-
//! Although there were other reason as well, this issue of expensive composition is the key thing
187+
//! Although there were other reasons as well, this issue of expensive composition is the key thing
188188
//! that drove Rust towards adopting a different model. It is particularly a problem
189189
//! when one considers, for example, the implications of composing together the [`Future`]s which
190190
//! will eventually make up an asynchronous task (including address-sensitive `async fn` state

library/core/tests/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@
112112
#![feature(const_slice_from_ref)]
113113
#![feature(waker_getters)]
114114
#![feature(error_generic_member_access)]
115-
#![feature(error_in_core)]
116115
#![feature(trait_upcasting)]
117116
#![feature(is_ascii_octdigit)]
118117
#![feature(get_many_mut)]

library/std/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,6 @@
324324
#![feature(core_io_borrowed_buf)]
325325
#![feature(duration_constants)]
326326
#![feature(error_generic_member_access)]
327-
#![feature(error_in_core)]
328327
#![feature(error_iter)]
329328
#![feature(exact_size_is_empty)]
330329
#![feature(exclusive_wrapper)]

library/std/src/sys/pal/unix/fs.rs

+4
Original file line numberDiff line numberDiff line change
@@ -1561,6 +1561,8 @@ impl fmt::Debug for File {
15611561
target_os = "netbsd",
15621562
target_os = "openbsd",
15631563
target_os = "vxworks",
1564+
target_os = "solaris",
1565+
target_os = "illumos",
15641566
target_vendor = "apple",
15651567
))]
15661568
fn get_mode(fd: c_int) -> Option<(bool, bool)> {
@@ -1583,6 +1585,8 @@ impl fmt::Debug for File {
15831585
target_os = "netbsd",
15841586
target_os = "openbsd",
15851587
target_os = "vxworks",
1588+
target_os = "solaris",
1589+
target_os = "illumos",
15861590
target_vendor = "apple",
15871591
)))]
15881592
fn get_mode(_fd: c_int) -> Option<(bool, bool)> {

src/ci/docker/host-x86_64/mingw-check/Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ ENV SCRIPT python3 ../x.py check --stage 0 --set build.optimized-compiler-builti
6161
/scripts/validate-toolstate.sh && \
6262
/scripts/validate-error-codes.sh && \
6363
reuse --include-submodules lint && \
64-
# Runs checks to ensure that there are no ES5 issues in our JS code.
65-
es-check es8 ../src/librustdoc/html/static/js/*.js && \
64+
# Runs checks to ensure that there are no issues in our JS code.
65+
es-check es2019 ../src/librustdoc/html/static/js/*.js && \
6666
eslint -c ../src/librustdoc/html/static/.eslintrc.js ../src/librustdoc/html/static/js/*.js && \
6767
eslint -c ../src/tools/rustdoc-js/.eslintrc.js ../src/tools/rustdoc-js/tester.js && \
6868
eslint -c ../src/tools/rustdoc-gui/.eslintrc.js ../src/tools/rustdoc-gui/tester.js

src/ci/docker/host-x86_64/x86_64-gnu-integration/Dockerfile

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# This job builds a toolchain capable of building Fuchsia, and then builds
2+
# Fuchsia. See the build-fuchsia.sh script in this directory for more details.
3+
14
FROM ubuntu:22.04
25

36
ARG DEBIAN_FRONTEND=noninteractive

src/ci/docker/host-x86_64/x86_64-gnu-integration/build-fuchsia.sh

+69-32
Original file line numberDiff line numberDiff line change
@@ -2,50 +2,87 @@
22

33
# Downloads and builds the Fuchsia operating system using a toolchain installed
44
# in $RUST_INSTALL_DIR.
5+
#
6+
# You may run this script locally using Docker with the following command:
7+
#
8+
# $ src/ci/docker/run.sh x86_64-gnu-integration
9+
#
10+
# Alternatively, from within the container with --dev, assuming you have made it
11+
# as far as building the toolchain with the above command:
12+
#
13+
# $ src/ci/docker/run.sh --dev x86_64-gnu-integration
14+
# docker# git config --global --add safe.directory /checkout/obj/fuchsia
15+
# docker# ../src/ci/docker/host-x86_64/x86_64-gnu-integration/build-fuchsia.sh
16+
#
17+
# Also see the docs in the rustc-dev-guide for more info:
18+
# https://github.com/rust-lang/rustc-dev-guide/pull/1989
519

620
set -euf -o pipefail
721

8-
INTEGRATION_SHA=1011e3298775ee7cdf6f6dc73e808d6a86e33bd6
22+
# Set this variable to 1 to disable updating the Fuchsia checkout. This is
23+
# useful for making local changes. You can find the Fuchsia checkout in
24+
# `obj/x86_64-gnu-integration/fuchsia` in your local checkout after running this
25+
# job for the first time.
26+
KEEP_CHECKOUT=
27+
28+
# Any upstream refs that should be cherry-picked. This can be used to include
29+
# Gerrit changes from https://fxrev.dev during development (click the "Download"
30+
# button on a changelist to see the cherry pick ref). Example:
31+
# PICK_REFS=(refs/changes/71/1054071/2 refs/changes/74/1054574/2)
932
PICK_REFS=()
1033

34+
# The commit hash of Fuchsia's integration.git to check out. This controls the
35+
# commit hash of fuchsia.git and some other repos in the "monorepo" checkout, in
36+
# addition to versions of prebuilts. It should be bumped regularly by the
37+
# Fuchsia team – we aim for every 1-2 months.
38+
INTEGRATION_SHA=1011e3298775ee7cdf6f6dc73e808d6a86e33bd6
39+
1140
checkout=fuchsia
1241
jiri=.jiri_root/bin/jiri
1342

1443
set -x
1544

16-
# This script will:
17-
# - create a directory named "fuchsia" if it does not exist
18-
# - download "jiri" to "fuchsia/.jiri_root/bin"
19-
curl -s "https://fuchsia.googlesource.com/jiri/+/HEAD/scripts/bootstrap_jiri?format=TEXT" \
20-
| base64 --decode \
21-
| bash -s $checkout
22-
23-
cd $checkout
24-
25-
$jiri init \
26-
-partial=true \
27-
-analytics-opt=false \
28-
.
29-
30-
$jiri import \
31-
-name=integration \
32-
-revision=$INTEGRATION_SHA \
33-
-overwrite=true \
34-
flower \
35-
"https://fuchsia.googlesource.com/integration"
36-
37-
if [ -d ".git" ]; then
38-
# Wipe out any local changes if we're reusing a checkout.
39-
git checkout --force JIRI_HEAD
40-
fi
45+
if [ -z "$KEEP_CHECKOUT" ]; then
46+
# This script will:
47+
# - create a directory named "fuchsia" if it does not exist
48+
# - download "jiri" to "fuchsia/.jiri_root/bin"
49+
curl -s "https://fuchsia.googlesource.com/jiri/+/HEAD/scripts/bootstrap_jiri?format=TEXT" \
50+
| base64 --decode \
51+
| bash -s $checkout
4152

42-
$jiri update -autoupdate=false
53+
cd $checkout
4354

44-
echo integration commit = $(git -C integration rev-parse HEAD)
55+
$jiri init \
56+
-partial=true \
57+
-analytics-opt=false \
58+
.
4559

46-
for git_ref in "${PICK_REFS[@]}"; do
47-
git fetch https://fuchsia.googlesource.com/fuchsia $git_ref
48-
git cherry-pick --no-commit FETCH_HEAD
49-
done
60+
$jiri import \
61+
-name=integration \
62+
-revision=$INTEGRATION_SHA \
63+
-overwrite=true \
64+
flower \
65+
"https://fuchsia.googlesource.com/integration"
66+
67+
if [ -d ".git" ]; then
68+
# Wipe out any local changes if we're reusing a checkout.
69+
git checkout --force JIRI_HEAD
70+
fi
71+
72+
$jiri update -autoupdate=false
73+
74+
echo integration commit = $(git -C integration rev-parse HEAD)
75+
76+
for git_ref in "${PICK_REFS[@]}"; do
77+
git fetch https://fuchsia.googlesource.com/fuchsia $git_ref
78+
git cherry-pick --no-commit FETCH_HEAD
79+
done
80+
else
81+
echo Reusing existing Fuchsia checkout
82+
cd $checkout
83+
fi
5084

85+
# Run the script inside the Fuchsia checkout responsible for building Fuchsia.
86+
# You can change arguments to the build by setting KEEP_CHECKOUT=1 above and
87+
# modifying them in build_fuchsia_from_rust_ci.sh.
5188
bash scripts/rust/build_fuchsia_from_rust_ci.sh

src/librustdoc/html/static/.eslintrc.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ module.exports = {
55
},
66
"extends": "eslint:recommended",
77
"parserOptions": {
8-
"ecmaVersion": 8,
8+
"ecmaVersion": 2019,
99
"sourceType": "module"
1010
},
1111
"rules": {

src/librustdoc/html/static/js/externs.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,9 @@ let ParserState;
4141
* foundElems: number,
4242
* totalElems: number,
4343
* literalSearch: boolean,
44-
* corrections: Array<{from: string, to: integer}>,
44+
* corrections: Array<{from: string, to: integer}> | null,
4545
* typeFingerprint: Uint32Array,
46+
* error: Array<string> | null,
4647
* }}
4748
*/
4849
let ParsedQuery;

0 commit comments

Comments
 (0)