Fix tests for changes in #26241.
This commit is contained in:
parent
eb99f0e420
commit
3226858e50
4 changed files with 5 additions and 19 deletions
|
|
@ -780,7 +780,7 @@ impl str {
|
|||
///
|
||||
/// # Examples
|
||||
/// ```
|
||||
/// # #![feature(collections)]
|
||||
/// # #![feature(str_split_at)]
|
||||
/// let s = "Löwe 老虎 Léopard";
|
||||
/// let first_space = s.find(' ').unwrap_or(s.len());
|
||||
/// let (a, b) = s.split_at(first_space);
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@
|
|||
#![feature(str_char)]
|
||||
#![feature(str_escape)]
|
||||
#![feature(str_match_indices)]
|
||||
#![feature(str_split_at)]
|
||||
#![feature(str_utf16)]
|
||||
#![feature(box_str)]
|
||||
#![feature(subslice_offset)]
|
||||
|
|
|
|||
|
|
@ -1,16 +0,0 @@
|
|||
// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
fn mutate(mut s: &mut str) {
|
||||
let _s: &mut str = &mut s[1..2];
|
||||
//~^ ERROR cannot borrow immutable indexed content as mutable
|
||||
}
|
||||
|
||||
pub fn main() {}
|
||||
|
|
@ -13,10 +13,11 @@ fn bot<T>() -> T { loop {} }
|
|||
fn mutate(s: &mut str) {
|
||||
s[1..2] = bot();
|
||||
//~^ ERROR `core::marker::Sized` is not implemented for the type `str`
|
||||
//~^^ ERROR `core::marker::Sized` is not implemented for the type `str`
|
||||
//~| ERROR `core::marker::Sized` is not implemented for the type `str`
|
||||
s[1usize] = bot();
|
||||
//~^ ERROR `core::ops::Index<usize>` is not implemented for the type `str`
|
||||
//~^^ ERROR `core::ops::Index<usize>` is not implemented for the type `str`
|
||||
//~| ERROR `core::ops::IndexMut<usize>` is not implemented for the type `str`
|
||||
//~| ERROR `core::ops::Index<usize>` is not implemented for the type `str`
|
||||
}
|
||||
|
||||
pub fn main() {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue