Skip to content

Rollup of 8 pull requests #43181

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 21 commits into from
Jul 12, 2017
Merged
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
84b880d
Add hint about the return code of panic!
dns2utf8 Jun 15, 2017
8205c34
Note different versions of same crate when absolute paths of differen…
Yorwba Jun 22, 2017
21bb60a
Replace `grep -z` by `tr -d '\r\n' | grep` for cross-compatibility
Yorwba Jun 29, 2017
01b6c94
Implement Eq/Hash/Debug etc. for unsized tuples.
qnighy Jul 1, 2017
728d26c
Add a test for unsized tuple impls.
qnighy Jul 4, 2017
d539057
Insert current implementation header
dns2utf8 Jul 5, 2017
9e001ce
Be more specific about the implications of the panic!
dns2utf8 Jul 5, 2017
05d3526
`rustc_on_unimplemented` supports referring to trait
estebank Jul 1, 2017
28ce292
Add `isize` and `usize` constructors to Literal
alexcrichton Jul 6, 2017
4d58b04
Redox: add stat methods(); support is_symlink()
ids1024 Jul 6, 2017
c6b280e
Add warning to BufWriter documentation
Jul 9, 2017
f2566bb
Correct some stability attributes
ollie27 Jul 10, 2017
133c1bc
Wrap long line
dns2utf8 Jul 11, 2017
500518a
Rollup merge of #42670 - dns2utf8:panic_return_code, r=steveklabnik
Mark-Simulacrum Jul 12, 2017
0926f9b
Rollup merge of #42826 - Yorwba:type-mismatch-same-absolute-paths, r=…
Mark-Simulacrum Jul 12, 2017
1a7dc0a
Rollup merge of #43000 - estebank:on-unimplemented-path, r=arielb1
Mark-Simulacrum Jul 12, 2017
e5288c9
Rollup merge of #43011 - qnighy:unsized-tuple-impls, r=aturon
Mark-Simulacrum Jul 12, 2017
2510116
Rollup merge of #43098 - alexcrichton:more-proc-macro, r=jseyfried
Mark-Simulacrum Jul 12, 2017
6aeb0f0
Rollup merge of #43100 - ids1024:stat2, r=aturon
Mark-Simulacrum Jul 12, 2017
cc20ab1
Rollup merge of #43136 - jgallag88:bufWriterDocs, r=steveklabnik
Mark-Simulacrum Jul 12, 2017
388fce9
Rollup merge of #43137 - ollie27:stab, r=aturon
Mark-Simulacrum Jul 12, 2017
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
15 changes: 15 additions & 0 deletions src/libstd/sys/redox/ext/fs.rs
Original file line number Diff line number Diff line change
@@ -177,6 +177,8 @@ pub trait MetadataExt {
#[stable(feature = "metadata_ext", since = "1.1.0")]
fn mode(&self) -> u32;
#[stable(feature = "metadata_ext", since = "1.1.0")]
fn nlink(&self) -> u64;
#[stable(feature = "metadata_ext", since = "1.1.0")]
fn uid(&self) -> u32;
#[stable(feature = "metadata_ext", since = "1.1.0")]
fn gid(&self) -> u32;
@@ -194,6 +196,10 @@ pub trait MetadataExt {
fn ctime(&self) -> i64;
#[stable(feature = "metadata_ext", since = "1.1.0")]
fn ctime_nsec(&self) -> i64;
#[stable(feature = "metadata_ext", since = "1.1.0")]
fn blksize(&self) -> u64;
#[stable(feature = "metadata_ext", since = "1.1.0")]
fn blocks(&self) -> u64;
}

#[stable(feature = "metadata_ext", since = "1.1.0")]
@@ -207,6 +213,9 @@ impl MetadataExt for fs::Metadata {
fn mode(&self) -> u32 {
self.as_inner().as_inner().st_mode as u32
}
fn nlink(&self) -> u64 {
self.as_inner().as_inner().st_nlink as u64
}
fn uid(&self) -> u32 {
self.as_inner().as_inner().st_uid as u32
}
@@ -234,6 +243,12 @@ impl MetadataExt for fs::Metadata {
fn ctime_nsec(&self) -> i64 {
self.as_inner().as_inner().st_ctime_nsec as i64
}
fn blksize(&self) -> u64 {
self.as_inner().as_inner().st_blksize as u64
}
fn blocks(&self) -> u64 {
self.as_inner().as_inner().st_blocks as u64
}
}

/// Add special Redox types (block/char device, fifo and socket)
4 changes: 2 additions & 2 deletions src/libstd/sys/redox/fs.rs
Original file line number Diff line number Diff line change
@@ -119,10 +119,10 @@ impl FilePermissions {
impl FileType {
pub fn is_dir(&self) -> bool { self.is(syscall::MODE_DIR) }
pub fn is_file(&self) -> bool { self.is(syscall::MODE_FILE) }
pub fn is_symlink(&self) -> bool { false /*FIXME: Implement symlink mode*/ }
pub fn is_symlink(&self) -> bool { self.is(syscall::MODE_SYMLINK) }

pub fn is(&self, mode: u16) -> bool {
self.mode & (syscall::MODE_DIR | syscall::MODE_FILE) == mode
self.mode & syscall::MODE_TYPE == mode
}
}