Skip to content

Commit 961a9d6

Browse files
committed
Auto merge of rust-lang#61741 - Centril:rollup-fgro5kz, r=Centril
Rollup of 11 pull requests Successful merges: - rust-lang#61518 (Add loops to doc list of things not stable in const fn) - rust-lang#61526 (move some tests into subfolders) - rust-lang#61550 (Windows 10 SDK is also required now.) - rust-lang#61606 (Remove some legacy proc macro flavors) - rust-lang#61652 (Mention slice patterns in array) - rust-lang#61686 (librustc_errors: Add some more documentation) - rust-lang#61698 (typeck: Fix const generic in repeat param ICE.) - rust-lang#61707 (Azure: retry failed awscli installs) - rust-lang#61715 (make sure make_ascii_lowercase actually leaves upper-case non-ASCII characters alone) - rust-lang#61724 (core: use memcmp optimization for 128 bit integer slices) - rust-lang#61726 (Use `for_each` in `Iterator::partition`) Failed merges: r? @ghost
2 parents 5f3656c + 681712b commit 961a9d6

Some content is hidden

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

48 files changed

+386
-749
lines changed

.azure-pipelines/steps/run.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,9 @@ steps:
7474
# images, etc.
7575
- bash: |
7676
set -e
77+
source src/ci/shared.sh
7778
sudo apt-get install -y python3-setuptools
78-
pip3 install awscli --upgrade --user
79+
retry pip3 install awscli --upgrade --user
7980
echo "##vso[task.prependpath]$HOME/.local/bin"
8081
displayName: Install awscli (Linux)
8182
condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux'))

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,9 @@ build.
130130

131131
MSVC builds of Rust additionally require an installation of Visual Studio 2017
132132
(or later) so `rustc` can use its linker. The simplest way is to get the
133-
[Visual Studio Build Tools] and check the “C++ build tools” workload.
133+
[Visual Studio], check the “C++ build tools” and “Windows 10 SDK” workload.
134134

135-
[Visual Studio Build Tools]: https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2019
135+
[Visual Studio]: https://visualstudio.microsoft.com/downloads/
136136

137137
(If you're installing cmake yourself, be careful that “C++ CMake tools for
138138
Windows” doesn't get included under “Individual components”.)

src/libcore/iter/traits/iterator.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1495,13 +1495,13 @@ pub trait Iterator {
14951495
let mut left: B = Default::default();
14961496
let mut right: B = Default::default();
14971497

1498-
for x in self {
1498+
self.for_each(|x| {
14991499
if f(&x) {
15001500
left.extend(Some(x))
15011501
} else {
15021502
right.extend(Some(x))
15031503
}
1504-
}
1504+
});
15051505

15061506
(left, right)
15071507
}

src/libcore/slice/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5420,7 +5420,7 @@ macro_rules! impl_marker_for {
54205420
}
54215421

54225422
impl_marker_for!(BytewiseEquality,
5423-
u8 i8 u16 i16 u32 i32 u64 i64 usize isize char bool);
5423+
u8 i8 u16 i16 u32 i32 u64 i64 u128 i128 usize isize char bool);
54245424

54255425
#[doc(hidden)]
54265426
unsafe impl<'a, T> TrustedRandomAccess for Iter<'a, T> {

src/libcore/str/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4000,11 +4000,11 @@ impl str {
40004000
/// # Examples
40014001
///
40024002
/// ```
4003-
/// let mut s = String::from("Grüße, Jürgen ❤");
4003+
/// let mut s = String::from("GRÜßE, JÜRGEN ❤");
40044004
///
40054005
/// s.make_ascii_lowercase();
40064006
///
4007-
/// assert_eq!("grüße, jürgen ❤", s);
4007+
/// assert_eq!("grÜße, jÜrgen ❤", s);
40084008
/// ```
40094009
#[stable(feature = "ascii_methods_on_intrinsics", since = "1.23.0")]
40104010
pub fn make_ascii_lowercase(&mut self) {

src/librustc/session/config.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,13 +227,17 @@ impl OutputType {
227227
}
228228
}
229229

230+
/// The type of diagnostics output to generate.
230231
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
231232
pub enum ErrorOutputType {
233+
/// Output meant for the consumption of humans.
232234
HumanReadable(HumanReadableErrorType),
235+
/// Output that's consumed by other tools such as `rustfix` or the `RLS`.
233236
Json {
234-
/// Render the json in a human readable way (with indents and newlines)
237+
/// Render the JSON in a human readable way (with indents and newlines).
235238
pretty: bool,
236-
/// The way the `rendered` field is created
239+
/// The JSON output includes a `rendered` field that includes the rendered
240+
/// human output.
237241
json_rendered: HumanReadableErrorType,
238242
},
239243
}

src/librustc_errors/diagnostic_builder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ impl<'a> DiagnosticBuilder<'a> {
348348

349349
/// Convenience function for internal use, clients should use one of the
350350
/// struct_* methods on Handler.
351-
pub fn new_with_code(handler: &'a Handler,
351+
crate fn new_with_code(handler: &'a Handler,
352352
level: Level,
353353
code: Option<DiagnosticId>,
354354
message: &str)

src/librustc_errors/emitter.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
//! The current rustc diagnostics emitter.
2+
//!
3+
//! An `Emitter` takes care of generating the output from a `DiagnosticBuilder` struct.
4+
//!
5+
//! There are various `Emitter` implementations that generate different output formats such as
6+
//! JSON and human readable output.
7+
//!
8+
//! The output types are defined in `librustc::session::config::ErrorOutputType`.
9+
110
use Destination::*;
211

312
use syntax_pos::{SourceFile, Span, MultiSpan};

src/librustc_errors/lib.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1+
//! Diagnostics creation and emission for `rustc`.
2+
//!
3+
//! This module contains the code for creating and emitting diagnostics.
4+
15
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/")]
26

7+
#![feature(crate_visibility_modifier)]
38
#![allow(unused_attributes)]
49
#![cfg_attr(unix, feature(libc))]
510
#![feature(nll)]

src/librustc_metadata/creader.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,7 @@ impl<'a> CrateLoader<'a> {
614614
match decl {
615615
ProcMacro::CustomDerive { trait_name, attributes, client } => {
616616
let attrs = attributes.iter().cloned().map(Symbol::intern).collect::<Vec<_>>();
617-
(trait_name, SyntaxExtension::ProcMacroDerive(
617+
(trait_name, SyntaxExtension::Derive(
618618
Box::new(ProcMacroDerive {
619619
client,
620620
attrs: attrs.clone(),
@@ -624,13 +624,13 @@ impl<'a> CrateLoader<'a> {
624624
))
625625
}
626626
ProcMacro::Attr { name, client } => {
627-
(name, SyntaxExtension::AttrProcMacro(
627+
(name, SyntaxExtension::Attr(
628628
Box::new(AttrProcMacro { client }),
629629
root.edition,
630630
))
631631
}
632632
ProcMacro::Bang { name, client } => {
633-
(name, SyntaxExtension::ProcMacro {
633+
(name, SyntaxExtension::Bang {
634634
expander: Box::new(BangProcMacro { client }),
635635
allow_internal_unstable: None,
636636
edition: root.edition,

0 commit comments

Comments
 (0)