Skip to content

Commit 49cc6fc

Browse files
committed
---
yaml --- r: 153401 b: refs/heads/try2 c: c5edc70 h: refs/heads/master i: 153399: a063000 v: v3
1 parent fef913b commit 49cc6fc

File tree

6 files changed

+11
-172
lines changed

6 files changed

+11
-172
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 0a1e251e81b0849fa5bd86b6fe0f2f5312d50bb5
8+
refs/heads/try2: c5edc70fadd136c0e0b1fe402fbb3170e94458aa
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/libcollections/str.rs

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -352,15 +352,6 @@ impl<'a> Iterator<char> for Decompositions<'a> {
352352
/// # Return value
353353
///
354354
/// The original string with all occurrences of `from` replaced with `to`
355-
///
356-
/// # Example
357-
///
358-
/// ```rust
359-
/// use std::str;
360-
/// let string = "orange";
361-
/// let new_string = str::replace(string, "or", "str");
362-
/// assert_eq!(new_string.as_slice(), "strange");
363-
/// ```
364355
pub fn replace(s: &str, from: &str, to: &str) -> String {
365356
let mut result = String::new();
366357
let mut last_end = 0;
@@ -582,14 +573,6 @@ pub type SendStr = MaybeOwned<'static>;
582573

583574
impl<'a> MaybeOwned<'a> {
584575
/// Returns `true` if this `MaybeOwned` wraps an owned string
585-
///
586-
/// # Example
587-
///
588-
/// ```rust
589-
/// let string = String::from_str("orange");
590-
/// let maybe_owned_string = string.into_maybe_owned();
591-
/// assert_eq!(true, maybe_owned_string.is_owned());
592-
/// ```
593576
#[inline]
594577
pub fn is_owned(&self) -> bool {
595578
match *self {
@@ -599,14 +582,6 @@ impl<'a> MaybeOwned<'a> {
599582
}
600583

601584
/// Returns `true` if this `MaybeOwned` wraps a borrowed string
602-
///
603-
/// # Example
604-
///
605-
/// ```rust
606-
/// let string = "orange";
607-
/// let maybe_owned_string = string.as_slice().into_maybe_owned();
608-
/// assert_eq!(true, maybe_owned_string.is_slice());
609-
/// ```
610585
#[inline]
611586
pub fn is_slice(&self) -> bool {
612587
match *self {
@@ -622,40 +597,18 @@ pub trait IntoMaybeOwned<'a> {
622597
fn into_maybe_owned(self) -> MaybeOwned<'a>;
623598
}
624599

625-
/// # Example
626-
///
627-
/// ```rust
628-
/// let owned_string = String::from_str("orange");
629-
/// let maybe_owned_string = owned_string.into_maybe_owned();
630-
/// assert_eq!(true, maybe_owned_string.is_owned());
631-
/// ```
632600
impl<'a> IntoMaybeOwned<'a> for String {
633601
#[inline]
634602
fn into_maybe_owned(self) -> MaybeOwned<'a> {
635603
Owned(self)
636604
}
637605
}
638606

639-
/// # Example
640-
///
641-
/// ```rust
642-
/// let string = "orange";
643-
/// let maybe_owned_str = string.as_slice().into_maybe_owned();
644-
/// assert_eq!(false, maybe_owned_str.is_owned());
645-
/// ```
646607
impl<'a> IntoMaybeOwned<'a> for &'a str {
647608
#[inline]
648609
fn into_maybe_owned(self) -> MaybeOwned<'a> { Slice(self) }
649610
}
650611

651-
/// # Example
652-
///
653-
/// ```rust
654-
/// let str = "orange";
655-
/// let maybe_owned_str = str.as_slice().into_maybe_owned();
656-
/// let maybe_maybe_owned_str = maybe_owned_str.into_maybe_owned();
657-
/// assert_eq!(false, maybe_maybe_owned_str.is_owned());
658-
/// ```
659612
impl<'a> IntoMaybeOwned<'a> for MaybeOwned<'a> {
660613
#[inline]
661614
fn into_maybe_owned(self) -> MaybeOwned<'a> { self }

branches/try2/src/libnative/io/process.rs

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -305,25 +305,6 @@ fn spawn_process_os(cfg: ProcessConfig,
305305
})
306306
}
307307

308-
// To have the spawning semantics of unix/windows stay the same, we need to
309-
// read the *child's* PATH if one is provided. See #15149 for more details.
310-
let program = cfg.env.and_then(|env| {
311-
for &(ref key, ref v) in env.iter() {
312-
if b"PATH" != key.as_bytes_no_nul() { continue }
313-
314-
// Split the value and test each path to see if the program exists.
315-
for path in os::split_paths(v.as_bytes_no_nul()).move_iter() {
316-
let path = path.join(cfg.program.as_bytes_no_nul())
317-
.with_extension(os::consts::EXE_EXTENSION);
318-
if path.exists() {
319-
return Some(path.to_c_str())
320-
}
321-
}
322-
break
323-
}
324-
None
325-
});
326-
327308
unsafe {
328309
let mut si = zeroed_startupinfo();
329310
si.cb = mem::size_of::<STARTUPINFO>() as DWORD;
@@ -381,8 +362,7 @@ fn spawn_process_os(cfg: ProcessConfig,
381362
try!(set_fd(&out_fd, &mut si.hStdOutput, false));
382363
try!(set_fd(&err_fd, &mut si.hStdError, false));
383364

384-
let cmd_str = make_command_line(program.as_ref().unwrap_or(cfg.program),
385-
cfg.args);
365+
let cmd_str = make_command_line(cfg.program, cfg.args);
386366
let mut pi = zeroed_process_information();
387367
let mut create_err = None;
388368

branches/try2/src/libstd/io/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ pub type IoResult<T> = Result<T, IoError>;
293293
/// # FIXME
294294
///
295295
/// Is something like this sufficient? It's kind of archaic
296-
#[deriving(PartialEq, Clone)]
296+
#[deriving(PartialEq, Eq, Clone)]
297297
pub struct IoError {
298298
/// An enumeration which can be matched against for determining the flavor
299299
/// of error.
@@ -435,7 +435,7 @@ impl fmt::Show for IoError {
435435
}
436436

437437
/// A list specifying general categories of I/O error.
438-
#[deriving(PartialEq, Clone, Show)]
438+
#[deriving(PartialEq, Eq, Clone, Show)]
439439
pub enum IoErrorKind {
440440
/// Any I/O error not part of this list.
441441
OtherIoError,

branches/try2/src/libstd/os.rs

Lines changed: 7 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -837,24 +837,13 @@ pub fn tmpdir() -> Path {
837837
}
838838
}
839839

840-
///
841-
/// Convert a relative path to an absolute path
842-
///
843-
/// If the given path is relative, return it prepended with the current working
844-
/// directory. If the given path is already an absolute path, return it
845-
/// as is.
846-
///
847-
/// # Example
848-
/// ```rust
849-
/// use std::os;
850-
/// use std::path::Path;
851-
///
852-
/// // Assume we're in a path like /home/someuser
853-
/// let rel_path = Path::new("..");
854-
/// let abs_path = os::make_absolute(&rel_path);
855-
/// println!("The absolute path is {}", abs_path.display());
856-
/// // Prints "The absolute path is /home"
857-
/// ```
840+
/**
841+
* Convert a relative path to an absolute path
842+
*
843+
* If the given path is relative, return it prepended with the current working
844+
* directory. If the given path is already an absolute path, return it
845+
* as is.
846+
*/
858847
// NB: this is here rather than in path because it is a form of environment
859848
// querying; what it does depends on the process working directory, not just
860849
// the input paths.
@@ -870,16 +859,6 @@ pub fn make_absolute(p: &Path) -> Path {
870859

871860
/// Changes the current working directory to the specified path, returning
872861
/// whether the change was completed successfully or not.
873-
///
874-
/// # Example
875-
/// ```rust
876-
/// use std::os;
877-
/// use std::path::Path;
878-
///
879-
/// let root = Path::new("/");
880-
/// assert!(os::change_dir(&root));
881-
/// println!("Succesfully changed working directory to {}!", root.display());
882-
/// ```
883862
pub fn change_dir(p: &Path) -> bool {
884863
return chdir(p);
885864

@@ -951,13 +930,6 @@ pub fn errno() -> uint {
951930
}
952931

953932
/// Return the string corresponding to an `errno()` value of `errnum`.
954-
/// # Example
955-
/// ```rust
956-
/// use std::os;
957-
///
958-
/// // Same as println!("{}", last_os_error());
959-
/// println!("{}", os::error_string(os::errno() as uint));
960-
/// ```
961933
pub fn error_string(errnum: uint) -> String {
962934
return strerror(errnum);
963935

@@ -1245,16 +1217,6 @@ extern "system" {
12451217
///
12461218
/// The arguments are interpreted as utf-8, with invalid bytes replaced with \uFFFD.
12471219
/// See `str::from_utf8_lossy` for details.
1248-
/// # Example
1249-
///
1250-
/// ```rust
1251-
/// use std::os;
1252-
///
1253-
/// // Prints each argument on a separate line
1254-
/// for argument in os::args().iter() {
1255-
/// println!("{}", argument);
1256-
/// }
1257-
/// ```
12581220
pub fn args() -> Vec<String> {
12591221
real_args()
12601222
}

branches/try2/src/test/run-pass/issue-15149.rs

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

0 commit comments

Comments
 (0)