Skip to content
Closed

debug #131455

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions compiler/rustc_serialize/src/serialize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ impl<D: Decoder, const N: usize> Decodable<D> for [u8; N] {
}
}

impl<'a, S: Encoder, T: Encodable<S>> Encodable<S> for Cow<'a, [T]>
impl<S: Encoder, T: Encodable<S>> Encodable<S> for Cow<'_, [T]>
where
[T]: ToOwned<Owned = Vec<T>>,
{
Expand All @@ -345,14 +345,14 @@ where
}
}

impl<'a, S: Encoder> Encodable<S> for Cow<'a, str> {
impl<S: Encoder> Encodable<S> for Cow<'_, str> {
fn encode(&self, s: &mut S) {
let val: &str = self;
val.encode(s)
}
}

impl<'a, D: Decoder> Decodable<D> for Cow<'a, str> {
impl<D: Decoder> Decodable<D> for Cow<'_, str> {
fn decode(d: &mut D) -> Cow<'static, str> {
let v: String = Decodable::decode(d);
Cow::Owned(v)
Expand Down
9 changes: 8 additions & 1 deletion src/bootstrap/src/core/builder/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ use super::*;
use crate::Flags;
use crate::core::build_steps::doc::DocumentationFormat;
use crate::core::config::Config;
use crate::core::download::is_download_ci_available;

fn configure(cmd: &str, host: &[&str], target: &[&str]) -> Config {
configure_with_args(&[cmd.to_owned()], host, target)
Expand Down Expand Up @@ -225,6 +226,10 @@ fn ci_rustc_if_unchanged_logic() {
|&_| Ok(Default::default()),
);

if !is_download_ci_available(&config.build.triple, config.llvm_assertions) {
return;
}

if config.rust_info.is_from_tarball() {
return;
}
Expand Down Expand Up @@ -257,7 +262,9 @@ fn ci_rustc_if_unchanged_logic() {
.unwrap()
.success();

assert!(has_changes == config.download_rustc_commit.is_none());
if config.download_rustc_commit.is_some() {
assert!(!has_changes);
}
}

mod defaults {
Expand Down
Loading