Skip to content

Commit ab91c70

Browse files
committed
Auto merge of #43216 - steveklabnik:rollup, r=steveklabnik
Rollup of 7 pull requests - Successful merges: #42926, #43125, #43157, #43167, #43187, #43203, #43204 - Failed merges:
2 parents b2c0707 + da3f5b8 commit ab91c70

File tree

8 files changed

+321
-25
lines changed

8 files changed

+321
-25
lines changed

.mailmap

+11-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#
77

88
Aaron Todd <[email protected]>
9+
Aaron Power <[email protected]>
910
Abhishek Chanda <[email protected]> Abhishek Chanda <[email protected]>
1011
Adolfo Ochagavía <[email protected]>
1112
Adrien Tétar <[email protected]>
@@ -56,18 +57,20 @@ Corey Richardson <[email protected]> Elaine "See More" Nemo <[email protected]>
5657
Cyryl Płotnicki <[email protected]>
5758
Damien Schoof <[email protected]>
5859
Daniel Ramos <[email protected]>
60+
Daniel J Rollins <[email protected]>
5961
David Klein <[email protected]>
6062
6163
David Ross <[email protected]>
6264
Derek Chiang <[email protected]> Derek Chiang (Enchi Jiang) <[email protected]>
6365
Diggory Hardy <[email protected]> Diggory Hardy <[email protected]>
6466
6567
Dzmitry Malyshau <[email protected]>
68+
6669
Eduardo Bautista <[email protected]> <=>
6770
71+
Eduard-Mihai Burtescu <[email protected]>
6872
6973
Elly Fong-Jones <[email protected]>
70-
Emily Dunham <[email protected]> edunham <[email protected]>
7174
7275
7376
Eric Holmes <[email protected]>
@@ -83,6 +86,8 @@ Gareth Daniel Smith <[email protected]> Gareth Smith <garethdanielsmit
8386
8487
Graham Fawcett <[email protected]> Graham Fawcett <[email protected]>
8588
Graydon Hoare <[email protected]> Graydon Hoare <[email protected]>
89+
Guillaume Gomez <[email protected]>
90+
Guillaume Gomez <[email protected]> ggomez <[email protected]>
8691
Guillaume Gomez <[email protected]> Guillaume Gomez <[email protected]>
8792
8893
@@ -114,6 +119,7 @@ John Kåre Alsaker <[email protected]>
114119
John Talling <[email protected]>
115120
116121
Jonathan S <[email protected]> Jonathan S <[email protected]>
122+
Jonathan Turner <[email protected]>
117123
118124
Joseph Martin <[email protected]>
119125
João Oliveira <[email protected]> joaoxsouls <[email protected]>
@@ -136,6 +142,7 @@ NAKASHIMA, Makoto <[email protected]> <[email protected]>
136142
137143
Marcell Pardavi <[email protected]>
138144
Margaret Meyerhofer <[email protected]> <mmeyerho@andrew>
145+
Mark Simulacrum <[email protected]>
139146
Mark Sinclair <[email protected]>
140147
Mark Sinclair <[email protected]> =Mark Sinclair <[email protected]>
141148
Markus Westerlind <[email protected]> Markus <[email protected]>
@@ -171,6 +178,7 @@ Peter Zotov <[email protected]>
171178
Phil Dawes <[email protected]> Phil Dawes <[email protected]>
172179
Philipp Brüschweiler <[email protected]> <[email protected]>
173180
Philipp Brüschweiler <[email protected]> <[email protected]>
181+
Philipp Matthias Schäfer <[email protected]>
174182
Przemysław Wesołek <[email protected]> Przemek Wesołek <[email protected]>
175183
Rafael Ávila de Espíndola <[email protected]> Rafael Avila de Espindola <espindola@dream.(none)>
176184
Ralph Giles <[email protected]> Ralph Giles <[email protected]>
@@ -189,11 +197,13 @@ S Pradeep Kumar <[email protected]>
189197
Scott Olson <[email protected]> Scott Olson <[email protected]>
190198
Sean Gillespie <[email protected]> swgillespie <[email protected]>
191199
Seonghyun Kim <[email protected]>
200+
Shyam Sundar B <[email protected]>
192201
Simon Barber-Dueck <[email protected]> Simon BD <simon@server>
193202
194203
Simonas Kazlauskas <[email protected]> Simonas Kazlauskas <[email protected]>
195204
startling <[email protected]>
196205
Stepan Koltsov <[email protected]> Stepan Koltsov <[email protected]>
206+
Steve Klabnik <[email protected]>
197207
198208
Steven Stewart-Gallus <[email protected]> <[email protected]>
199209
Stuart Pernsteiner <[email protected]> Stuart Pernsteiner <[email protected]>

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ matrix:
122122
- env: IMAGE=dist-x86_64-linux DEPLOY_ALT=1
123123
- env: >
124124
RUST_CHECK_TARGET=dist
125-
RUST_CONFIGURE_ARGS="--enable-extended"
125+
RUST_CONFIGURE_ARGS="--enable-extended --enable-profiler"
126126
SRC=.
127127
DEPLOY_ALT=1
128128
RUSTC_RETRY_LINKER_ON_SEGFAULT=1

CODE_OF_CONDUCT.md

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# The Rust Code of Conduct
2+
3+
A version of this document [can be found online](https://www.rust-lang.org/conduct.html).
4+
5+
## Conduct
6+
7+
**Contact**: [[email protected]](mailto:[email protected])
8+
9+
* We are committed to providing a friendly, safe and welcoming environment for all, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion, nationality, or other similar characteristic.
10+
* On IRC, please avoid using overtly sexual nicknames or other nicknames that might detract from a friendly, safe and welcoming environment for all.
11+
* Please be kind and courteous. There's no need to be mean or rude.
12+
* Respect that people have differences of opinion and that every design or implementation choice carries a trade-off and numerous costs. There is seldom a right answer.
13+
* Please keep unstructured critique to a minimum. If you have solid ideas you want to experiment with, make a fork and see how it works.
14+
* We will exclude you from interaction if you insult, demean or harass anyone. That is not welcome behaviour. We interpret the term "harassment" as including the definition in the <a href="http://citizencodeofconduct.org/">Citizen Code of Conduct</a>; if you have any lack of clarity about what might be included in that concept, please read their definition. In particular, we don't tolerate behavior that excludes people in socially marginalized groups.
15+
* Private harassment is also unacceptable. No matter who you are, if you feel you have been or are being harassed or made uncomfortable by a community member, please contact one of the channel ops or any of the [Rust moderation team](/team.html#Moderation) immediately. Whether you're a regular contributor or a newcomer, we care about making this community a safe place for you and we've got your back.
16+
* Likewise any spamming, trolling, flaming, baiting or other attention-stealing behaviour is not welcome.
17+
18+
## Moderation
19+
20+
21+
These are the policies for upholding our community's standards of conduct. If you feel that a thread needs moderation, please contact the [Rust moderation team](/team.html#Moderation).
22+
23+
1. Remarks that violate the Rust standards of conduct, including hateful, hurtful, oppressive, or exclusionary remarks, are not allowed. (Cursing is allowed, but never targeting another user, and never in a hateful manner.)
24+
2. Remarks that moderators find inappropriate, whether listed in the code of conduct or not, are also not allowed.
25+
3. Moderators will first respond to such remarks with a warning.
26+
4. If the warning is unheeded, the user will be "kicked," i.e., kicked out of the communication channel to cool off.
27+
5. If the user comes back and continues to make trouble, they will be banned, i.e., indefinitely excluded.
28+
6. Moderators may choose at their discretion to un-ban the user if it was a first offense and they offer the offended party a genuine apology.
29+
7. If a moderator bans someone and you think it was unjustified, please take it up with that moderator, or with a different moderator, **in private**. Complaints about bans in-channel are not allowed.
30+
8. Moderators are held to a higher standard than other community members. If a moderator creates an inappropriate situation, they should expect less leeway than others.
31+
32+
In the Rust community we strive to go the extra step to look out for each other. Don't just aim to be technically unimpeachable, try to be your best self. In particular, avoid flirting with offensive or sensitive issues, particularly if they're off-topic; this all too often leads to unnecessary fights, hurt feelings, and damaged trust; worse, it can drive people away from the community entirely.
33+
34+
And if someone takes issue with something you said or did, resist the urge to be defensive. Just stop doing what it was they complained about and apologize. Even if you feel you were misinterpreted or unfairly accused, chances are good there was something you could've communicated better — remember that it's your responsibility to make your fellow Rustaceans comfortable. Everyone wants to get along and we are all here first and foremost because we want to talk about cool technology. You will find that people will be eager to assume good intent and forgive as long as you earn their trust.
35+
36+
The enforcement policies listed above apply to all official Rust venues; including official IRC channels (#rust, #rust-internals, #rust-tools, #rust-libs, #rustc, #rust-beginners, #rust-docs, #rust-community, #rust-lang, and #cargo); GitHub repositories under rust-lang, rust-lang-nursery, and rust-lang-deprecated; and all forums under rust-lang.org (users.rust-lang.org, internals.rust-lang.org). For other projects adopting the Rust Code of Conduct, please contact the maintainers of those projects for enforcement. If you wish to use this code of conduct for your own project, consider explicitly mentioning your moderation policy or making a copy with your own moderation policy so as to avoid confusion.
37+
38+
*Adapted from the [Node.js Policy on Trolling](http://blog.izs.me/post/30036893703/policy-on-trolling) as well as the [Contributor Covenant v1.3.0](http://contributor-covenant.org/version/1/3/0/).*

appveyor.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ environment:
7575

7676
# "alternate" deployment, see .travis.yml for more info
7777
- MSYS_BITS: 64
78-
RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc --enable-extended
78+
RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc --enable-extended --enable-profiler
7979
SCRIPT: python x.py dist
8080
DEPLOY_ALT: 1
8181

src/libstd/path.rs

+34
Original file line numberDiff line numberDiff line change
@@ -2216,12 +2216,22 @@ impl Path {
22162216
/// This function will traverse symbolic links to query information about the
22172217
/// destination file. In case of broken symbolic links this will return `false`.
22182218
///
2219+
/// If you cannot access the directory containing the file, e.g. because of a
2220+
/// permission error, this will return `false`.
2221+
///
22192222
/// # Examples
22202223
///
22212224
/// ```no_run
22222225
/// use std::path::Path;
22232226
/// assert_eq!(Path::new("does_not_exist.txt").exists(), false);
22242227
/// ```
2228+
///
2229+
/// # See Also
2230+
///
2231+
/// This is a convenience function that coerces errors to false. If you want to
2232+
/// check errors, call [fs::metadata].
2233+
///
2234+
/// [fs::metadata]: ../../std/fs/fn.metadata.html
22252235
#[stable(feature = "path_ext", since = "1.5.0")]
22262236
pub fn exists(&self) -> bool {
22272237
fs::metadata(self).is_ok()
@@ -2232,13 +2242,25 @@ impl Path {
22322242
/// This function will traverse symbolic links to query information about the
22332243
/// destination file. In case of broken symbolic links this will return `false`.
22342244
///
2245+
/// If you cannot access the directory containing the file, e.g. because of a
2246+
/// permission error, this will return `false`.
2247+
///
22352248
/// # Examples
22362249
///
22372250
/// ```no_run
22382251
/// use std::path::Path;
22392252
/// assert_eq!(Path::new("./is_a_directory/").is_file(), false);
22402253
/// assert_eq!(Path::new("a_file.txt").is_file(), true);
22412254
/// ```
2255+
///
2256+
/// # See Also
2257+
///
2258+
/// This is a convenience function that coerces errors to false. If you want to
2259+
/// check errors, call [fs::metadata] and handle its Result. Then call
2260+
/// [fs::Metadata::is_file] if it was Ok.
2261+
///
2262+
/// [fs::metadata]: ../../std/fs/fn.metadata.html
2263+
/// [fs::Metadata::is_file]: ../../std/fs/struct.Metadata.html#method.is_file
22422264
#[stable(feature = "path_ext", since = "1.5.0")]
22432265
pub fn is_file(&self) -> bool {
22442266
fs::metadata(self).map(|m| m.is_file()).unwrap_or(false)
@@ -2249,13 +2271,25 @@ impl Path {
22492271
/// This function will traverse symbolic links to query information about the
22502272
/// destination file. In case of broken symbolic links this will return `false`.
22512273
///
2274+
/// If you cannot access the directory containing the file, e.g. because of a
2275+
/// permission error, this will return `false`.
2276+
///
22522277
/// # Examples
22532278
///
22542279
/// ```no_run
22552280
/// use std::path::Path;
22562281
/// assert_eq!(Path::new("./is_a_directory/").is_dir(), true);
22572282
/// assert_eq!(Path::new("a_file.txt").is_dir(), false);
22582283
/// ```
2284+
///
2285+
/// # See Also
2286+
///
2287+
/// This is a convenience function that coerces errors to false. If you want to
2288+
/// check errors, call [fs::metadata] and handle its Result. Then call
2289+
/// [fs::Metadata::is_dir] if it was Ok.
2290+
///
2291+
/// [fs::metadata]: ../../std/fs/fn.metadata.html
2292+
/// [fs::Metadata::is_dir]: ../../std/fs/struct.Metadata.html#method.is_dir
22592293
#[stable(feature = "path_ext", since = "1.5.0")]
22602294
pub fn is_dir(&self) -> bool {
22612295
fs::metadata(self).map(|m| m.is_dir()).unwrap_or(false)

src/libstd/sys/redox/fs.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -383,9 +383,10 @@ pub fn unlink(p: &Path) -> io::Result<()> {
383383
Ok(())
384384
}
385385

386-
pub fn rename(_old: &Path, _new: &Path) -> io::Result<()> {
387-
::sys_common::util::dumb_print(format_args!("Rename\n"));
388-
unimplemented!();
386+
pub fn rename(old: &Path, new: &Path) -> io::Result<()> {
387+
copy(old, new)?;
388+
unlink(old)?;
389+
Ok(())
389390
}
390391

391392
pub fn set_perm(p: &Path, perm: FilePermissions) -> io::Result<()> {

src/libstd/sys/redox/mod.rs

+1-19
Original file line numberDiff line numberDiff line change
@@ -39,25 +39,7 @@ pub mod thread_local;
3939
pub mod time;
4040

4141
#[cfg(not(test))]
42-
pub fn init() {
43-
use alloc::oom;
44-
45-
oom::set_oom_handler(oom_handler);
46-
47-
// A nicer handler for out-of-memory situations than the default one. This
48-
// one prints a message to stderr before aborting. It is critical that this
49-
// code does not allocate any memory since we are in an OOM situation. Any
50-
// errors are ignored while printing since there's nothing we can do about
51-
// them and we are about to exit anyways.
52-
fn oom_handler() -> ! {
53-
use intrinsics;
54-
let msg = "fatal runtime error: out of memory\n";
55-
unsafe {
56-
let _ = syscall::write(2, msg.as_bytes());
57-
intrinsics::abort();
58-
}
59-
}
60-
}
42+
pub fn init() {}
6143

6244
pub fn decode_error_kind(errno: i32) -> ErrorKind {
6345
match errno {

0 commit comments

Comments
 (0)