1
Fork 0
Commit graph

147 commits

Author SHA1 Message Date
Mazdak Farrokhzad
379c380a60 libstd: deny(elided_lifetimes_in_paths) 2019-03-31 12:56:51 +02:00
Jethro Beekman
f229422cc1 SGX target: fix std unit tests 2019-03-25 11:31:19 -07:00
Taiki Endo
93b6d9e086 libstd => 2018 2019-02-28 04:06:15 +09:00
Scott McMurray
3bea2ca49d Use more impl header lifetime elision
There are two big categories of changes in here

- Removing lifetimes from common traits that can essentially never user a lifetime from an input (particularly `Drop` & `Debug`)
- Forwarding impls that are only possible because the lifetime doesn't matter (like `impl<R: Read + ?Sized> Read for &mut R`)

I omitted things that seemed like they could be more controversial, like the handful of iterators that have a `Item: 'static` despite the iterator having a lifetime or the `PartialEq` implementations where the flipped one cannot elide the lifetime.
2019-02-17 19:42:36 -08:00
Mark Rousskov
2a663555dd Remove licenses 2018-12-25 21:08:33 -07:00
ljedrz
8c4129cd9a cleanup: remove static lifetimes from consts in libstd 2018-12-04 10:21:42 +01:00
Ralf Jung
e9a88eaaf9 make reference to dirs crate clickable in terminals 2018-07-12 12:48:10 +02:00
Simon Ochsenreither
0afc16a039 Deprecate std::env::home_dir and fix incorrect documentation 2018-07-07 01:28:37 +02:00
John-John Tedro
f73c4a4768 env: remove unwrap in examples in favor of try op 2018-05-14 12:56:18 +02:00
Oliver Middleton
521e41e77d Correct a few stability attributes 2018-04-05 15:39:29 +01:00
Corey Farwell
e9dcec070d Remove hidden foo functions from doc examples; use Termination trait.
Fixes https://github.com/rust-lang/rust/issues/49233.
2018-03-28 13:15:05 +02:00
panicbit
b439632a75 Unimplement Send/Sync for ::env::{Args,ArgsOs,Vars,VarsOs} 2018-02-05 00:00:09 +01:00
Ed Schouten
d9d97c9f09 Make tests build on CloudABI.
There are some tests that need to be disabled on CloudABI specifically,
due to the fact that the shims cannot be built in combination with
unix::ext or windows::ext. Also improve the scoping of some imports to
suppress compiler warnings.
2018-01-11 11:28:34 +01:00
Corey Farwell
17380f2ac6 Minor rewrite of env::current_exe docs; clarify symlinks.
- Update example in ‘security’ section to use hard links, like the
  linked securityvulns.com example.
- Weaken language on symbolic links – indicate behavior is
  platform-specific

Fixes https://github.com/rust-lang/rust/issues/43617.
2017-12-24 11:29:13 -08:00
Kornel
53de42e333 Warn about non-portability of glob patterns 2017-11-07 17:01:56 +00:00
Stepan Koltsov
45af6ee4fc Move global vars changing tests into run-pass
Should fix race #42795
2017-06-24 18:23:39 +03:00
bors
6f01c84fc8 Auto merge of #42798 - stepancheg:args-debug, r=sfackler
Better Debug for Args and ArgsOs

Display actual args instead of two dots.
2017-06-22 10:34:21 +00:00
Stepan Koltsov
275f9a04af Better Debug for Args and ArgsOs
Display actual args instead of two dots.
2017-06-21 15:40:45 +03:00
Corey Farwell
58bbe1d68c Add a couple doc additional examples for env::join_paths. 2017-06-20 13:49:42 -04:00
Corey Farwell
3a550a4893 Rollup merge of #42579 - maccoda:maccoda/env_docs, r=steveklabnik
env docs completion.

Should be closing #29351 with the alignment of the iterators to the template.
2017-06-12 12:39:46 -04:00
Dylan Maccora
f52ac18840 env docs completion. 2017-06-10 16:19:28 +10:00
Mark Simulacrum
9ce4616960 Rollup merge of #42091 - maccoda:maccoda/env_docs, r=frewsxcv
Improving std::env docs

Addresses #29351.
Hopefully this addresses the following points:
> -  iterators should use the standard iterator boilerplate like https://doc.rust-lang.org/std/iter/struct.Map.html, this applies to all structs except for JoinPathsError
> -  JoinPathsError should properly link the function it comes from and use language similar to https://doc.rust-lang.org/std/io/struct.Error.html
> -  same wording issues with VarError
> - functions need to ensure linkage to things they refer to in their descriptions
> - Explain the difference between `os` and non-`os` structs and methods
2017-05-20 17:48:13 -06:00
bors
272e77f035 Auto merge of #42111 - ollie27:stab, r=Mark-Simulacrum
Correct some stability versions

These were found by running tidy on stable versions of rust and finding
features stabilised with the wrong version numbers.
2017-05-20 15:42:43 +00:00
Oliver Middleton
2f703e4304 Correct some stability versions
These were found by running tidy on stable versions of rust and finding
features stabilised with the wrong version numbers.
2017-05-20 08:38:39 +01:00
Dylan Maccora
55d75c42ef Merge branch 'master' into maccoda/env_docs 2017-05-20 09:42:37 +10:00
Dylan Maccora
b69b6413af Fixed link issue. 2017-05-20 08:32:10 +10:00
Dylan Maccora
fb19560054 std::env docs 2017-05-18 18:26:47 +10:00
Tshepang Lekhonkhobe
b9552963d1 misc doc improvements for std::env 2017-05-18 06:47:58 +02:00
Jack O'Connor
03b83a01ad clarify docs for Args and ArgsOs
The args() and args_os() docs include a line about how the first element
is usually the program name. Include that line in the struct docs too.
2017-03-05 16:39:26 -05:00
Guillaume Gomez
84aca88cda Add missing urls for env functions 2017-02-18 14:44:56 +01:00
Guillaume Gomez
3022614ec3 Add missing urls on join_paths 2017-02-08 21:53:49 +01:00
Guillaume Gomez
d0378089de Add missing urls for current_dir 2017-02-07 19:43:22 +01:00
Oliver Middleton
9128f6100c Fix a few impl stability attributes
The versions show up in rustdoc.
2017-01-29 13:31:47 +00:00
Oliver Middleton
09b3903aec Fix a few links in the docs 2017-01-27 18:08:51 +00:00
Utkarsh Kukreti
9d912b683a libstd: replace all try! with ? in documentation examples
See #38644.
2017-01-22 21:07:38 +05:30
Corey Farwell
58a470e344 Minor improvements to docs in std::env structures/functions.
* Call functions "functions" instead of "methods".
* Link structures to their constructor functions
* Add other misc. documentation links
2017-01-12 23:10:38 -05:00
Jonathan A. Kollasch
eda889c5bf libstd: define std::env::consts::ARCH for sparc64 2016-12-29 21:30:01 -05:00
Corey Farwell
86fc63e62d Implement fmt::Debug for all structures in libstd.
Part of https://github.com/rust-lang/rust/issues/31869.

Also turn on the `missing_debug_implementations` lint at the crate
level.
2016-12-18 14:55:14 -08:00
Ulrik Sverdrup
7ba762253c std: Forward ExactSizeIterator::is_empty for Args, ArgsOs iterators 2016-12-04 15:46:36 +01:00
John Downey
9170ddf1e4 Add some internal docs links for Args/ArgsOs 2016-11-21 16:12:14 -06:00
Brian Anderson
4d76ac8492 Move platform-specific arg handling to sys::args 2016-10-02 14:52:30 -07:00
Brian Anderson
5c21562302 std: Move platform specific env code into sys 2016-10-01 19:32:59 +00:00
Brian Anderson
9c4a01ee9e Ignore lots and lots of std tests on emscripten 2016-09-30 14:02:48 -07:00
Brian Anderson
b8b50f0eda Preliminary wasm32 support 2016-09-30 14:02:45 -07:00
Niels Sascha Reedijk
1a6fc8b7b8 Add support for the Haiku operating system on x86 and x86_64 machines
* Hand rebased from Niels original work on 1.9.0
2016-09-25 11:12:23 -05:00
Tshepang Lekhonkhobe
a6da082e10 doc: make that sound better 2016-09-14 22:47:56 +02:00
Ulrich Weigand
19b84088d7 Add s390x support
This adds support for building the Rust compiler and standard
library for s390x-linux, allowing a full cross-bootstrap sequence
to complete.  This includes:

- Makefile/configure changes to allow native s390x builds
- Full Rust compiler support for the s390x C ABI
  (only the non-vector ABI is supported at this point)
- Port of the standard library to s390x
- Update the liblibc submodule to a version including s390x support
- Testsuite fixes to allow clean "make check" on s390x

Caveats:

- Resets base cpu to "z10" to bring support in sync with the default
  behaviour of other compilers on the platforms.  (Usually, upstream
  supports all older processors; a distribution build may then chose
  to require a more recent base version.)  (Also, using zEC12 causes
  failures in the valgrind tests since valgrind doesn't fully support
  this CPU yet.)

- z13 vector ABI is not yet supported.  To ensure compatible code
  generation, the -vector feature is passed to LLVM.  Note that this
  means that even when compiling for z13, no vector instructions
  will be used.  In the future, support for the vector ABI should be
  added (this will require common code support for different ABIs
  that need different data_layout strings on the same platform).

- Two test cases are (temporarily) ignored on s390x to allow passing
  the test suite.  The underlying issues still need to be fixed:
  * debuginfo/simd.rs fails because of incorrect debug information.
    This seems to be a LLVM bug (also seen with C code).
  * run-pass/union/union-basic.rs simply seems to be incorrect for
    all big-endian platforms.

Signed-off-by: Ulrich Weigand <ulrich.weigand@de.ibm.com>
2016-09-09 22:28:19 +01:00
bors
689c6c48ec Auto merge of #36024 - japaric:mips64, r=alexcrichton
add mips64-gnu and mips64el-gnu targets

With this commit one can build no_core (and probably no_std as well)
Rust programs for these targets. It's not yet possible to cross compile
std for these targets because rust-lang/libc doesn't know about the
mips64 architecture.

These targets have been tested by cross compiling the "smallest hello"
program (see code below) and then running it under QEMU.

``` rust

extern {
    fn puts(_: *const u8);
}

fn start(_: isize, _: *const *const u8) -> isize {
    unsafe {
        let msg = b"Hello, world!\0";
        puts(msg as *const _ as *const u8);
    }
    0
}

trait Copy {}

trait Sized {}
```

cc #36015
r? @alexcrichton
cc @brson

The cabi stuff is likely wrong. I just copied cabi_mips source and changed some `4`s to `8`s and `32`s to `64`s. It was enough to get libc's `puts` to work but I'd like someone familiar with this module to check it.
2016-09-02 03:01:48 -07:00
Jorge Aparicio
43615a03f3 fix cross compilation of std 2016-08-27 01:40:29 -05:00
Jeffrey Seyfried
9a2c8783d9 Use #[prelude_import] in libstd. 2016-08-24 22:12:48 +00:00