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 <github@opprobrio.us>
9+
Aaron Power <theaaronepower@gmail.com>
910
Abhishek Chanda <abhishek.becs@gmail.com> Abhishek Chanda <abhishek@cloudscaling.com>
1011
Adolfo Ochagavía <aochagavia92@gmail.com>
1112
Adrien Tétar <adri-from-59@hotmail.fr>
@@ -56,18 +57,20 @@ Corey Richardson <corey@octayn.net> Elaine "See More" Nemo <corey@octayn.net>
5657
Cyryl Płotnicki <cyplo@cyplo.net>
5758
Damien Schoof <damien.schoof@gmail.com>
5859
Daniel Ramos <dan@daramos.com>
60+
Daniel J Rollins <drollins@financialforce.com>
5961
David Klein <david.klein@baesystemsdetica.com>
6062
David Manescu <david.manescu@gmail.com> <dman2626@uni.sydney.edu.au>
6163
David Ross <daboross@daboross.net>
6264
Derek Chiang <derekchiang93@gmail.com> Derek Chiang (Enchi Jiang) <derekchiang93@gmail.com>
6365
Diggory Hardy <diggory.hardy@gmail.com> Diggory Hardy <github@dhardy.name>
6466
Dylan Braithwaite <dylanbraithwaite1@gmail.com> <mail@dylanb.me>
6567
Dzmitry Malyshau <kvarkus@gmail.com>
68+
E. Dunham <edunham@mozilla.com> edunham <edunham@mozilla.com>
6669
Eduardo Bautista <me@eduardobautista.com> <=>
6770
Eduardo Bautista <me@eduardobautista.com> <mail@eduardobautista.com>
71+
Eduard-Mihai Burtescu <edy.burt@gmail.com>
6872
Elliott Slaughter <elliottslaughter@gmail.com> <eslaughter@mozilla.com>
6973
Elly Fong-Jones <elly@leptoquark.net>
70-
Emily Dunham <edunham@mozilla.com> edunham <edunham@mozilla.com>
7174
Eric Holk <eric.holk@gmail.com> <eholk@cs.indiana.edu>
7275
Eric Holk <eric.holk@gmail.com> <eholk@mozilla.com>
7376
Eric Holmes <eric@ejholmes.net>
@@ -83,6 +86,8 @@ Gareth Daniel Smith <garethdanielsmith@gmail.com> Gareth Smith <garethdanielsmit
8386
Georges Dubus <georges.dubus@gmail.com> <georges.dubus@compiletoi.net>
8487
Graham Fawcett <graham.fawcett@gmail.com> Graham Fawcett <fawcett@uwindsor.ca>
8588
Graydon Hoare <graydon@pobox.com> Graydon Hoare <graydon@mozilla.com>
89+
Guillaume Gomez <guillaume1.gomez@gmail.com>
90+
Guillaume Gomez <guillaume1.gomez@gmail.com> ggomez <ggomez@ggo.ifr.lan>
8691
Guillaume Gomez <guillaume1.gomez@gmail.com> Guillaume Gomez <ggomez@ggo.ifr.lan>
8792
Heather <heather@cynede.net> <Cynede@Gentoo.org>
8893
Heather <heather@cynede.net> <Heather@cynede.net>
@@ -114,6 +119,7 @@ John Kåre Alsaker <john.kare.alsaker@gmail.com>
114119
John Talling <inrustwetrust@users.noreply.github.com>
115120
Jonathan Bailey <jbailey@mozilla.com> <jbailey@jbailey-20809.local>
116121
Jonathan S <gereeter@gmail.com> Jonathan S <gereeter+code@gmail.com>
122+
Jonathan Turner <probata@hotmail.com>
117123
Jorge Aparicio <japaric@linux.com> <japaricious@gmail.com>
118124
Joseph Martin <pythoner6@gmail.com>
119125
João Oliveira <hello@jxs.pt> joaoxsouls <joaoxsouls@gmail.com>
@@ -136,6 +142,7 @@ NAKASHIMA, Makoto <makoto.nksm+github@gmail.com> <makoto.nksm@gmail.com>
136142
NAKASHIMA, Makoto <makoto.nksm+github@gmail.com> <makoto.nksm+github@gmail.com>
137143
Marcell Pardavi <marcell.pardavi@gmail.com>
138144
Margaret Meyerhofer <mmeyerho@andrew.cmu.edu> <mmeyerho@andrew>
145+
Mark Simulacrum <mark.simulacrum@gmail.com>
139146
Mark Sinclair <mark.edward.x@gmail.com>
140147
Mark Sinclair <mark.edward.x@gmail.com> =Mark Sinclair <=125axel125@gmail.com>
141148
Markus Westerlind <marwes91@gmail.com> Markus <marwes91@gmail.com>
@@ -171,6 +178,7 @@ Peter Zotov <whitequark@whitequark.org>
171178
Phil Dawes <phil@phildawes.net> Phil Dawes <pdawes@drw.com>
172179
Philipp Brüschweiler <blei42@gmail.com> <blei42@gmail.com>
173180
Philipp Brüschweiler <blei42@gmail.com> <bruphili@student.ethz.ch>
181+
Philipp Matthias Schäfer <philipp.matthias.schaefer@posteo.de>
174182
Przemysław Wesołek <jest@go.art.pl> Przemek Wesołek <jest@go.art.pl>
175183
Rafael Ávila de Espíndola <respindola@mozilla.com> Rafael Avila de Espindola <espindola@dream.(none)>
176184
Ralph Giles <giles@thaumas.net> Ralph Giles <giles@mozilla.com>
@@ -189,11 +197,13 @@ S Pradeep Kumar <gohanpra@gmail.com>
189197
Scott Olson <scott@solson.me> Scott Olson <scott@scott-olson.org>
190198
Sean Gillespie <sean.william.g@gmail.com> swgillespie <sean.william.g@gmail.com>
191199
Seonghyun Kim <sh8281.kim@samsung.com>
200+
Shyam Sundar B <shyambaskaran@outlook.com>
192201
Simon Barber-Dueck <sbarberdueck@gmail.com> Simon BD <simon@server>
193202
Simon Sapin <simon@exyr.org> <simon.sapin@exyr.org>
194203
Simonas Kazlauskas <git@kazlauskas.me> Simonas Kazlauskas <github@kazlauskas.me>
195204
startling <tdixon51793@gmail.com>
196205
Stepan Koltsov <stepan.koltsov@gmail.com> Stepan Koltsov <nga@yandex-team.ru>
206+
Steve Klabnik <steve@steveklabnik.com>
197207
Steven Fackler <sfackler@gmail.com> <sfackler@palantir.com>
198208
Steven Stewart-Gallus <sstewartgallus00@langara.bc.ca> <sstewartgallus00@mylangara.bc.ca>
199209
Stuart Pernsteiner <stuart@pernsteiner.org> Stuart Pernsteiner <spernsteiner@mozilla.com>

.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**: [rust-mods@rust-lang.org](mailto:rust-mods@rust-lang.org)
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)