Commit Graph

80766 Commits

Author SHA1 Message Date
Esteban Küber 93b2bb01a9 Remove dependency on `libsyntax` 2018-07-21 16:18:06 -07:00
Esteban Küber a7a68370a7 Change `eprintln!()`
Address #30143 as well. `writeln!()` hasn't been changed.
2018-07-21 15:56:37 -07:00
Esteban Küber 00d500052c Gate `format_args_nll` behind feature flag 2018-07-21 15:50:46 -07:00
Esteban Küber 83a8af50bb Suggest space separated format str literal 2018-07-21 12:16:06 -07:00
Esteban Küber 8b59fbc951 fix grep test looking for newline 2018-07-20 15:37:49 -07:00
Esteban Küber 9112e1a4cd fix rebase 2018-07-20 11:04:23 -07:00
Esteban Küber 052159be53 fix incorrect position of chars in fmt str 2018-07-20 09:15:22 -07:00
Esteban Küber 85da68cb6d Rebase and fix text changed by master 2018-07-19 23:21:00 -07:00
Esteban Küber f4306ffbfc Use correct spans for format string errors
When encountering format string errors in a raw string, or regular
string literal with embedded newlines, account for the positional
change to use correct spans.

:drive by fix: 🚗
2018-07-19 23:18:07 -07:00
Esteban Küber 154dee2dcc rework println 2018-07-19 23:18:07 -07:00
Esteban Küber a47653214f Fix hir tree test 2018-07-19 23:18:07 -07:00
Esteban Küber e613bfb701 Same change as `println` for `eprintln` 2018-07-19 23:18:07 -07:00
Esteban Küber fbce952193 review comments: modify note wording and change `println`
- Don't print the newline on its own to avoid the possibility of
  printing it out of order due to `stdout` locking.
- Modify wording of `concat!()` with non-literals to not mislead into
  believing that only `&str` literals are accepted.
- Add test for `concat!()` with non-literals.
2018-07-19 23:18:07 -07:00
Esteban Küber f53c145ef1 Improve suggestion for missing fmt str in println
Avoid using `concat!(fmt, "\n")` to improve the diagnostics being
emitted when the first `println!()` argument isn't a formatting string
literal.
2018-07-19 23:18:07 -07:00
bors bc14d71622 Auto merge of #52349 - RalfJung:once, r=alexcrichton
sync::Once use release-acquire access modes

Nothing here makes a case distinction like "this happened before OR after that". All we need is to get happens-before edges whenever we see that the state/signal has been changed. Release-acquire is good enough for that.
2018-07-20 02:52:19 +00:00
bors c7cba3d33f Auto merge of #52024 - oli-obk:existential_parse, r=nikomatsakis
Implement existential types

(not for associated types yet)

r? @nikomatsakis

cc @Centril @varkor @alexreg
2018-07-19 21:14:01 +00:00
bors 11864c4e6c Auto merge of #51854 - davidtwco:rfc-2008-rustdoc, r=QuietMisdreavus
RFC 2008 non-exhaustive enums/structs: Rustdoc

Part of #44109. Not sure how those who maintain rustdoc primarily would prefer this addition look or where it should be placed, happy to make any changes required.

r? @QuietMisdreavus (not sure if this is the right person, just guessing)
2018-07-19 19:03:03 +00:00
Oliver Schneider 9017f79282 Generate a page for existential types 2018-07-19 18:11:28 +02:00
David Wood b671bdc381
Updated FRU terminology. 2018-07-19 17:03:17 +01:00
bors a8247dd5c6 Auto merge of #52197 - euclio:exit-code, r=oli-obk
overhaul exit codes for rustc and rustdoc

This commit changes the exit status of rustc to 1 in the presence of
compilation errors. In the event of an unexpected panic (ICE) the
standard panic error exit status of 101 remains.

A run-make test is added to ensure that the exit code does not regress,
and compiletest is updated to check for an exit status of 1 or 101,
depending on the mode and suite.

This is a breaking change for custom drivers.

Note that while changes were made to the rustdoc binary, there is no
intended behavior change. rustdoc errors (i.e., failed lints) will still
report 101. While this could *also* hide potential ICEs, I will leave
that work to a future PR.

Fixes #51971.
2018-07-19 13:46:15 +00:00
bors 5ba21844f6 Auto merge of #52515 - Manishearth:clippyup, r=kennytm
Update clippy

Silences the warnings for now, will fix those over time.
2018-07-19 09:55:17 +00:00
Manish Goregaokar 6c06b015a1 Update clippy 2018-07-18 20:25:11 -07:00
bors 0fc4501256 Auto merge of #52429 - alexcrichton:update-cargo, r=Mark-Simulacrum
Update Cargo and stdsimd submodules

Update Cargo to bring in some bug fixes and such, and update `stdsimd` to...

Closes #52403
2018-07-19 03:05:05 +00:00
bors 629d891499 Auto merge of #52486 - kennytm:rollup, r=kennytm
Rollup of 13 pull requests

Successful merges:

 - #51628 (use checked write in `LineWriter` example)
 - #52116 (Handle array manually in str case conversion methods)
 - #52218 (Amend option.take examples)
 - #52418 (Do not use desugared ident when suggesting adding a type)
 - #52439 (Revert some changes from #51917 to fix custom libdir)
 - #52455 (Fix doc comment: use `?` instead of `.unwrap()`)
 - #52458 (rustc: Fix a suggestion for the `proc_macro` feature)
 - #52464 (Allow clippy to be installed with make install)
 - #52472 (rustc: Enable `use_extern_macros` in 2018 edition)
 - #52477 (Clarify short-circuiting behvaior of Iterator::zip.)
 - #52480 (Cleanup #24958)
 - #52487 (Don't build twice the sanitizers on Linux)
 - #52510 (rustdoc: remove FIXME about macro redirects)

Failed merges:

r? @ghost
2018-07-19 00:56:21 +00:00
Alex Crichton 52d7ee83c0 Update Cargo submodule 2018-07-18 15:30:39 -07:00
bors 166795dda6 Auto merge of #52431 - semarie:compiler-builtins, r=alexcrichton
update compiler-builtins for openbsd

import rust-lang-nursery/compiler-builtins/pull/249 in rust main line.

it solves an issue on OpenBSD with building of `librsvg`.
2018-07-18 22:15:46 +00:00
kennytm ae9c550415
Rollup merge of #52510 - QuietMisdreavus:redirects-are-cool, r=nrc
rustdoc: remove FIXME about macro redirects

Based on the discussion in #35705, the rustdoc team has determined that macro redirects are here to stay.

Closes #35705
2018-07-19 05:46:10 +08:00
kennytm 8336f1b171
Rollup merge of #52418 - estebank:desugaring-type, r=nikomatsakis
Do not use desugared ident when suggesting adding a type

Re #51116.
2018-07-19 05:45:16 +08:00
QuietMisdreavus 5d5414480c
remove FIXME about macro redirects
Based on the discussion in #35705, the rustdoc team has determined that macro redirects are here to stay.

Closes #35705
2018-07-18 15:41:13 -05:00
David Wood 959a13d53e
Updated wording and placement of non-exhaustive notice so it is collapsed by default and easier to understand. 2018-07-18 20:27:25 +01:00
Sébastien Marie 49bc25bf05 update compiler-builtins for openbsd 2018-07-18 10:38:56 -07:00
Esteban Küber 2c5b60d8f0 Update test output 2018-07-18 10:04:10 -07:00
Esteban Küber 4c96932da7 Change label span to point at iterator instead of iter item 2018-07-18 10:02:15 -07:00
Esteban Küber ed362c07ff Do not use desugared ident when suggesting adding a type 2018-07-18 10:02:15 -07:00
kennytm b1c6b76739
Rollup merge of #52480 - ljedrz:cleanup_24958, r=oli-obk
Cleanup #24958

Since #24958 was closed we might want to remove the workarounds it introduced for android, arm and aarch64.
2018-07-19 01:00:33 +08:00
kennytm 9fe86e566d
Rollup merge of #51628 - euclio:line-writer, r=frewsxcv
use checked write in `LineWriter` example

The example was wrong because it didn't check the return value of
`write()`, and it didn't flush the buffer before comparing the contents
of the file.

Fixes #51621.
2018-07-19 00:59:47 +08:00
kennytm 1e5a8c65c1
Rollup merge of #52487 - alexcrichton:build-less-sanitizers, r=kennytm
Don't build twice the sanitizers on Linux

This commit is an attempted fix at #50887. It was noticed that on that issue
we're building both x86_64 and i386 versions of libraries, but we only actually
need the x86_64 versions! This hopes that the build race condition exhibited
in #50887 is connected to building both architectures and/or building a lot of
libraries, so this should help us build precisely what we need and no more.
2018-07-19 00:58:55 +08:00
bors 12ed235adc Auto merge of #52375 - oli-obk:the_early_lint_pass_gets_the_worm, r=Manishearth
Lint `async` identifiers in 2018 preparation mode

r? @Manishearth

fixes https://github.com/rust-lang/rust/issues/49716
2018-07-18 15:04:17 +00:00
Alex Crichton 2e5d925926 Don't build twice the sanitizers on Linux
This commit is an attempted fix at #50887. It was noticed that on that issue
we're building both x86_64 and i386 versions of libraries, but we only actually
need the x86_64 versions! This hopes that the build race condition exhibited
in #50887 is connected to building both architectures and/or building a lot of
libraries, so this should help us build precisely what we need and no more.
2018-07-18 07:44:11 -07:00
kennytm 091c9d2eed
Rollup merge of #52477 - frewsxcv:frewsxcv-iter-short, r=alexcrichton
Clarify short-circuiting behvaior of Iterator::zip.

Fixes https://github.com/rust-lang/rust/issues/52279.
2018-07-18 22:35:04 +08:00
kennytm 5624d2a292
Rollup merge of #52472 - alexcrichton:macros-edition-2018, r=petrochenkov
rustc: Enable `use_extern_macros` in 2018 edition

This was previously enabled via `proc_macro`, but since `proc_macro` is now
stable this is no longer the case. Explicitly include it in the 2018 edition
here.
2018-07-18 22:35:03 +08:00
kennytm fa9f91d9b1
Rollup merge of #52464 - o01eg:patch-1, r=alexcrichton
Allow clippy to be installed with make install

After #51122 clippy is available as a component but doesn't install when building from source.

This PR allows to install clippy with extended tools.
2018-07-18 22:35:01 +08:00
kennytm 5dd3275237
Rollup merge of #52458 - alexcrichton:fix-suggestion, r=petrochenkov
rustc: Fix a suggestion for the `proc_macro` feature

This feature is stable, we shouldn't suggest it any more! Instead suggest the
real feature, `use_extern_macros`.
2018-07-18 22:35:00 +08:00
kennytm d94a279538
Rollup merge of #52455 - felixrabe:patch-1, r=estebank
Fix doc comment: use `?` instead of `.unwrap()`
2018-07-18 22:34:59 +08:00
kennytm 47a1d6b183
Rollup merge of #52439 - o01eg:fix-52317, r=alexcrichton
Revert some changes from #51917 to fix custom libdir

Should fix #52317 also adds `libdir` value to output.
2018-07-18 22:34:57 +08:00
kennytm 21f7d2b674
Rollup merge of #52218 - rivertam:patch-1, r=withoutboats
Amend option.take examples

It wasn't abundantly clear to me what `.take` returned. Perhaps this is a slightly frivolous change, but I think it's an improvement. =)

Apologies if I'm not following proper procedures.
2018-07-18 22:34:56 +08:00
kennytm 2712fbed24
Rollup merge of #52116 - Pazzaz:match-str-case, r=SimonSapin
Handle array manually in str case conversion methods

Avoiding the overhead incurred from `String.extend(char.to_lowercase())` showed a notable performance improvement when I benchmarked it.

I tested on these strings:
```rust
ALL_LOWER:       "loremipsumdolorsitametduosensibusmnesarchumabcdefgh"
ALL_UPPER:       "LOREMIPSUMDOLORSITAMETDUOSENSIBUSMNESARCHUMABCDEFGH"
REALISTIC_UPPER: "LOREM IPSUM DOLOR SIT AMET, DUO SENSIBUS MNESARCHUM"
SIGMAS:          "ΣΣΣΣΣ ΣΣΣΣΣ ΣΣΣΣΣ ΣΣΣ ΣΣΣΣ, ΣΣΣ ΣΣΣΣΣΣΣΣ ΣΣΣΣΣΣΣΣΣΣ"
WORD_UPPER:      "Lorem Ipsum Dolor Sit Amet, Duo Sensibus Mnesarchum"
```
the performance improvements of `to_lowercase()` were
```
running 10 tests
test tests::all_lower           ... bench:       1,752 ns/iter (+/- 49)
test tests::all_lower_new       ... bench:       1,266 ns/iter (+/- 15)   -28%
test tests::all_upper           ... bench:       1,832 ns/iter (+/- 39)
test tests::all_upper_new       ... bench:       1,337 ns/iter (+/- 18)   -27%
test tests::realistic_upper     ... bench:       1,993 ns/iter (+/- 14)
test tests::realistic_upper_new ... bench:       1,445 ns/iter (+/- 22)   -27%
test tests::sigmas              ... bench:       1,342 ns/iter (+/- 39)
test tests::sigmas_new          ... bench:       1,226 ns/iter (+/- 16)    -9%
test tests::word_upper          ... bench:       1,899 ns/iter (+/- 12)
test tests::word_upper_new      ... bench:       1,381 ns/iter (+/- 26)   -27%
```
and of `to_uppercase()`
```
running 10 tests
test tests::all_lower           ... bench:       1,813 ns/iter (+/- 20)
test tests::all_lower_new       ... bench:       1,321 ns/iter (+/- 16)   -27%
test tests::all_upper           ... bench:       1,629 ns/iter (+/- 22)
test tests::all_upper_new       ... bench:       1,241 ns/iter (+/- 9)    -24%
test tests::realistic_upper     ... bench:       1,670 ns/iter (+/- 24)
test tests::realistic_upper_new ... bench:       1,241 ns/iter (+/- 17)   -26%
test tests::sigmas              ... bench:       2,053 ns/iter (+/- 20)
test tests::sigmas_new          ... bench:       1,753 ns/iter (+/- 23)   -15%
test tests::word_upper          ... bench:       1,873 ns/iter (+/- 30)
test tests::word_upper_new      ... bench:       1,412 ns/iter (+/- 25)   -25%
```
I gave up on the more advanced method from #52061 as it wasn't always a clear improvement and would help in even less cases if this PR was merged.
2018-07-18 22:34:54 +08:00
Oliver Schneider 442d5d83e2 Adjust run pass test to stricter existential type rules 2018-07-18 14:14:04 +02:00
ljedrz ef2bac4f10 Remove workarounds for #24958 2018-07-18 13:58:08 +02:00
bors 29ee65411c Auto merge of #52364 - ljedrz:mir_remove_clone, r=RalfJung
Remove a clone in mir/transform/add_validation

Remove a clone of `mir.local_decls`.
2018-07-18 11:49:38 +00:00