Skip to content

Commit 256e497

Browse files
committed
Auto merge of rust-lang#42245 - frewsxcv:rollup, r=frewsxcv
Rollup of 7 pull requests - Successful merges: rust-lang#42169, rust-lang#42215, rust-lang#42216, rust-lang#42224, rust-lang#42230, rust-lang#42236, rust-lang#42241 - Failed merges:
2 parents c732446 + 252a286 commit 256e497

File tree

20 files changed

+168
-40
lines changed

20 files changed

+168
-40
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# `step_trait`
22

3-
The tracking issue for this feature is: [#27741]
3+
The tracking issue for this feature is: [#42168]
44

5-
[#27741]: https://github.com/rust-lang/rust/issues/27741
5+
[#42168]: https://github.com/rust-lang/rust/issues/42168
66

77
------------------------

src/libcollections/slice.rs

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,12 @@ impl<T> [T] {
393393
}
394394

395395
/// Returns a reference to an element or subslice, without doing bounds
396-
/// checking. So use it very carefully!
396+
/// checking.
397+
///
398+
/// This is generally not recommended, use with caution! For a safe
399+
/// alternative see [`get`].
400+
///
401+
/// [`get`]: #method.get
397402
///
398403
/// # Examples
399404
///
@@ -413,7 +418,12 @@ impl<T> [T] {
413418
}
414419

415420
/// Returns a mutable reference to an element or subslice, without doing
416-
/// bounds checking. So use it very carefully!
421+
/// bounds checking.
422+
///
423+
/// This is generally not recommended, use with caution! For a safe
424+
/// alternative see [`get_mut`].
425+
///
426+
/// [`get_mut`]: #method.get_mut
417427
///
418428
/// # Examples
419429
///

src/libcollections/str.rs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,12 @@ impl str {
435435
/// Creates a string slice from another string slice, bypassing safety
436436
/// checks.
437437
///
438+
/// This is generally not recommended, use with caution! For a safe
439+
/// alternative see [`str`] and [`Index`].
440+
///
441+
/// [`str`]: primitive.str.html
442+
/// [`Index`]: ops/trait.Index.html
443+
///
438444
/// This new slice goes from `begin` to `end`, including `begin` but
439445
/// excluding `end`.
440446
///
@@ -477,6 +483,11 @@ impl str {
477483

478484
/// Creates a string slice from another string slice, bypassing safety
479485
/// checks.
486+
/// This is generally not recommended, use with caution! For a safe
487+
/// alternative see [`str`] and [`IndexMut`].
488+
///
489+
/// [`str`]: primitive.str.html
490+
/// [`IndexMut`]: ops/trait.IndexMut.html
480491
///
481492
/// This new slice goes from `begin` to `end`, including `begin` but
482493
/// excluding `end`.
@@ -1018,7 +1029,7 @@ impl str {
10181029
///
10191030
/// ```
10201031
/// let x = "(///)".to_string();
1021-
/// let d: Vec<_> = x.split('/').collect();;
1032+
/// let d: Vec<_> = x.split('/').collect();
10221033
///
10231034
/// assert_eq!(d, &["(", "", "", ")"]);
10241035
/// ```

src/libcore/iter/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ pub use self::iterator::Iterator;
309309

310310
#[unstable(feature = "step_trait",
311311
reason = "likely to be replaced by finer-grained traits",
312-
issue = "27741")]
312+
issue = "42168")]
313313
pub use self::range::Step;
314314
#[unstable(feature = "step_by", reason = "recent addition",
315315
issue = "27741")]

src/libcore/iter/range.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ use super::{FusedIterator, TrustedLen};
2020
/// two `Step` objects.
2121
#[unstable(feature = "step_trait",
2222
reason = "likely to be replaced by finer-grained traits",
23-
issue = "27741")]
23+
issue = "42168")]
2424
pub trait Step: PartialOrd + Sized {
2525
/// Steps `self` if possible.
2626
fn step(&self, by: &Self) -> Option<Self>;
@@ -55,7 +55,7 @@ macro_rules! step_impl_unsigned {
5555
($($t:ty)*) => ($(
5656
#[unstable(feature = "step_trait",
5757
reason = "likely to be replaced by finer-grained traits",
58-
issue = "27741")]
58+
issue = "42168")]
5959
impl Step for $t {
6060
#[inline]
6161
fn step(&self, by: &$t) -> Option<$t> {
@@ -115,7 +115,7 @@ macro_rules! step_impl_signed {
115115
($($t:ty)*) => ($(
116116
#[unstable(feature = "step_trait",
117117
reason = "likely to be replaced by finer-grained traits",
118-
issue = "27741")]
118+
issue = "42168")]
119119
impl Step for $t {
120120
#[inline]
121121
fn step(&self, by: &$t) -> Option<$t> {
@@ -187,7 +187,7 @@ macro_rules! step_impl_no_between {
187187
($($t:ty)*) => ($(
188188
#[unstable(feature = "step_trait",
189189
reason = "likely to be replaced by finer-grained traits",
190-
issue = "27741")]
190+
issue = "42168")]
191191
impl Step for $t {
192192
#[inline]
193193
fn step(&self, by: &$t) -> Option<$t> {

src/librustc_llvm/Cargo.lock

Lines changed: 0 additions & 22 deletions
This file was deleted.

src/librustc_passes/consts.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ impl<'a, 'tcx> Visitor<'tcx> for CheckCrateVisitor<'a, 'tcx> {
141141
let outer_penv = self.tcx.infer_ctxt(body_id, Reveal::UserFacing).enter(|infcx| {
142142
let param_env = infcx.param_env.clone();
143143
let outer_penv = mem::replace(&mut self.param_env, param_env);
144-
let region_maps = &self.tcx.region_maps(item_def_id);;
144+
let region_maps = &self.tcx.region_maps(item_def_id);
145145
euv::ExprUseVisitor::new(self, region_maps, &infcx).consume_body(body);
146146
outer_penv
147147
});

src/librustc_trans/mir/block.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -901,7 +901,7 @@ impl<'a, 'tcx> MirContext<'a, 'tcx> {
901901
let llty = type_of::type_of(bcx.ccx, val.ty);
902902
let cast_ptr = bcx.pointercast(dst.llval, llty.ptr_to());
903903
let in_type = val.ty;
904-
let out_type = dst.ty.to_ty(bcx.tcx());;
904+
let out_type = dst.ty.to_ty(bcx.tcx());
905905
let llalign = cmp::min(bcx.ccx.align_of(in_type), bcx.ccx.align_of(out_type));
906906
self.store_operand(bcx, cast_ptr, Some(llalign), val);
907907
}

src/librustc_typeck/astconv.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -963,7 +963,7 @@ impl<'o, 'gcx: 'tcx, 'tcx> AstConv<'gcx, 'tcx>+'o {
963963
pub fn prohibit_projection(&self, span: Span) {
964964
let mut err = struct_span_err!(self.tcx().sess, span, E0229,
965965
"associated type bindings are not allowed here");
966-
err.span_label(span, "associate type not allowed here").emit();
966+
err.span_label(span, "associated type not allowed here").emit();
967967
}
968968

969969
// Check a type Path and convert it to a Ty.

src/libstd/fs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1545,7 +1545,7 @@ pub fn create_dir<P: AsRef<Path>>(path: P) -> io::Result<()> {
15451545
/// determined to not exist) are outlined by `fs::create_dir`.
15461546
///
15471547
/// Notable exception is made for situations where any of the directories
1548-
/// specified in the `path` could not be created as it was created concurrently.
1548+
/// specified in the `path` could not be created as it was being created concurrently.
15491549
/// Such cases are considered success. In other words: calling `create_dir_all`
15501550
/// concurrently from multiple threads or processes is guaranteed to not fail
15511551
/// due to race itself.

0 commit comments

Comments
 (0)