forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of rust-lang#95090 - matthiaskrgr:rollup-pho6x6s, r=matthi…
…askrgr Rollup of 7 pull requests Successful merges: - rust-lang#94115 (Let `try_collect` take advantage of `try_fold` overrides) - rust-lang#94295 (Always evaluate all cfg predicate in all() and any()) - rust-lang#94848 (Compare installed browser-ui-test version to the one used in CI) - rust-lang#94993 (Add test for >65535 hashes in lexing raw string) - rust-lang#95017 (Derive Eq for std::cmp::Ordering, instead of using manual impl.) - rust-lang#95058 (Add use of bool::then in sys/unix/process) - rust-lang#95083 (Document that `Option<extern "abi" fn>` discriminant elision applies for any ABI) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
- Loading branch information
Showing
17 changed files
with
215 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
use crate::ops::Try; | ||
|
||
/// Like `Iterator::by_ref`, but requiring `Sized` so it can forward generics. | ||
/// | ||
/// Ideally this will no longer be required, eventually, but as can be seen in | ||
/// the benchmarks (as of Feb 2022 at least) `by_ref` can have performance cost. | ||
pub(crate) struct ByRefSized<'a, I>(pub &'a mut I); | ||
|
||
impl<I: Iterator> Iterator for ByRefSized<'_, I> { | ||
type Item = I::Item; | ||
|
||
fn next(&mut self) -> Option<Self::Item> { | ||
self.0.next() | ||
} | ||
|
||
fn size_hint(&self) -> (usize, Option<usize>) { | ||
self.0.size_hint() | ||
} | ||
|
||
fn advance_by(&mut self, n: usize) -> Result<(), usize> { | ||
self.0.advance_by(n) | ||
} | ||
|
||
fn nth(&mut self, n: usize) -> Option<Self::Item> { | ||
self.0.nth(n) | ||
} | ||
|
||
fn fold<B, F>(self, init: B, f: F) -> B | ||
where | ||
F: FnMut(B, Self::Item) -> B, | ||
{ | ||
self.0.fold(init, f) | ||
} | ||
|
||
fn try_fold<B, F, R>(&mut self, init: B, f: F) -> R | ||
where | ||
F: FnMut(B, Self::Item) -> R, | ||
R: Try<Output = B>, | ||
{ | ||
self.0.try_fold(init, f) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,14 +65,20 @@ RUN /scripts/cmake.sh | |
COPY host-x86_64/x86_64-gnu-tools/checktools.sh /tmp/ | ||
|
||
RUN curl -sL https://nodejs.org/dist/v14.4.0/node-v14.4.0-linux-x64.tar.xz | tar -xJ | ||
ENV PATH="/node-v14.4.0-linux-x64/bin:${PATH}" | ||
ENV NODE_FOLDER=/node-v14.4.0-linux-x64/bin | ||
ENV PATH="$NODE_FOLDER:${PATH}" | ||
|
||
COPY host-x86_64/x86_64-gnu-tools/browser-ui-test.version /tmp/ | ||
|
||
# For now, we need to use `--unsafe-perm=true` to go around an issue when npm tries | ||
# to create a new folder. For reference: | ||
# https://github.com/puppeteer/puppeteer/issues/375 | ||
# | ||
# We also specify the version in case we need to update it to go around cache limitations. | ||
RUN npm install -g [email protected] --unsafe-perm=true | ||
# | ||
# The `browser-ui-test.version` file is also used by bootstrap to emit warnings in case | ||
# the local version of the package is different than the one used by the CI. | ||
RUN npm install -g browser-ui-test@$(head -n 1 /tmp/browser-ui-test.version) --unsafe-perm=true | ||
|
||
ENV RUST_CONFIGURE_ARGS \ | ||
--build=x86_64-unknown-linux-gnu \ | ||
|
1 change: 1 addition & 0 deletions
1
src/ci/docker/host-x86_64/x86_64-gnu-tools/browser-ui-test.version
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
0.8.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// check-fail | ||
|
||
#[cfg(any(foo, foo::bar))] | ||
//~^ERROR `cfg` predicate key must be an identifier | ||
fn foo1() {} | ||
|
||
#[cfg(any(foo::bar, foo))] | ||
//~^ERROR `cfg` predicate key must be an identifier | ||
fn foo2() {} | ||
|
||
#[cfg(all(foo, foo::bar))] | ||
//~^ERROR `cfg` predicate key must be an identifier | ||
fn foo3() {} | ||
|
||
#[cfg(all(foo::bar, foo))] | ||
//~^ERROR `cfg` predicate key must be an identifier | ||
fn foo4() {} | ||
|
||
fn main() {} |
Oops, something went wrong.