]> git.lizzy.rs Git - rust.git/log
rust.git
5 years agoChange sys::Thread::new to take the thread entry as Box<dyn FnBox() + 'static>̣
Jethro Beekman [Fri, 30 Nov 2018 05:09:12 +0000 (10:39 +0530)]
Change sys::Thread::new to take the thread entry as Box<dyn FnBox() + 'static>̣

5 years agoUpdate compiler_builtins and remove wasm f32<->f64 math conversions
Jethro Beekman [Wed, 21 Nov 2018 08:46:00 +0000 (14:16 +0530)]
Update compiler_builtins and remove wasm f32<->f64 math conversions

5 years agoRefactor net::each_addr/lookup_host to forward error from resolve
Jethro Beekman [Tue, 18 Sep 2018 22:25:08 +0000 (15:25 -0700)]
Refactor net::each_addr/lookup_host to forward error from resolve

5 years agoRefactor stderr_prints_nothing into a more modular function
Jethro Beekman [Mon, 27 Aug 2018 16:57:51 +0000 (09:57 -0700)]
Refactor stderr_prints_nothing into a more modular function

5 years agoAuto merge of #56557 - pietroalbini:rollup, r=pietroalbini
bors [Thu, 6 Dec 2018 12:41:30 +0000 (12:41 +0000)]
Auto merge of #56557 - pietroalbini:rollup, r=pietroalbini

Rollup of 11 pull requests

Successful merges:

 - #56315 (Rustdoc inline macro reexport)
 - #56332 ([rustdoc] Specific crate search)
 - #56362 (Stabilise exhaustive integer patterns)
 - #56426 (libsyntax_pos: A few tweaks)
 - #56441 (rustbuild: Fix issues with compiler docs)
 - #56446 (pass the parameter environment to `traits::find_associated_item`)
 - #56500 (cleanup: remove static lifetimes from consts)
 - #56525 (Avoid extra copy and syscall in std::env::current_exe)
 - #56528 (Remove unused dependency (rustc_lint -> rustc_mir))
 - #56548 (Optimized string FromIterator + Extend impls)
 - #56553 (Don't print the profiling summary to stdout when -Zprofile-json is set)

Failed merges:

r? @ghost

5 years agoAuto merge of #55635 - oli-obk:min_const_unsafe_fn, r=nikomatsakis
bors [Thu, 6 Dec 2018 10:18:17 +0000 (10:18 +0000)]
Auto merge of #55635 - oli-obk:min_const_unsafe_fn, r=nikomatsakis

Allow calling `const unsafe fn` in `const fn` behind a feature gate

cc #55607

r? @Centril

5 years agoRollup merge of #56553 - wesleywiser:silence_profiler_output, r=Mark-Simulacrum
Pietro Albini [Thu, 6 Dec 2018 06:49:02 +0000 (07:49 +0100)]
Rollup merge of #56553 - wesleywiser:silence_profiler_output, r=Mark-Simulacrum

Don't print the profiling summary to stdout when -Zprofile-json is set

cc rust-lang-nursery/rustc-perf#299

5 years agoRollup merge of #56548 - Lucretiel:string-extend-optimize, r=sfackler
Pietro Albini [Thu, 6 Dec 2018 06:49:01 +0000 (07:49 +0100)]
Rollup merge of #56548 - Lucretiel:string-extend-optimize, r=sfackler

Optimized string FromIterator + Extend impls

I noticed that there was a lost opportunity to reuse string buffers in `FromIterator<String>` and `FromIterator<Cow<str>>`; updated the implementations to use these. In practice this translates to at least one fewer allocation when using these APIs.

Additionally, rewrote `Extend` implementations to use `iter.for_each`, which (supposedly) helps the compiler optimize those loops (because iterator adapters are encouraged to provide optimized implementations of `fold` and `try_fold`.

5 years agoRollup merge of #56528 - sinkuu:unused_dep, r=Mark-Simulacrum
Pietro Albini [Thu, 6 Dec 2018 06:49:00 +0000 (07:49 +0100)]
Rollup merge of #56528 - sinkuu:unused_dep, r=Mark-Simulacrum

Remove unused dependency (rustc_lint -> rustc_mir)

5 years agoRollup merge of #56525 - udoprog:linux-current-exe, r=alexcrichton
Pietro Albini [Thu, 6 Dec 2018 06:48:58 +0000 (07:48 +0100)]
Rollup merge of #56525 - udoprog:linux-current-exe, r=alexcrichton

Avoid extra copy and syscall in std::env::current_exe

5 years agoRollup merge of #56500 - ljedrz:cleanup_rest_of_const_lifetimes, r=zackmdavis
Pietro Albini [Thu, 6 Dec 2018 06:48:57 +0000 (07:48 +0100)]
Rollup merge of #56500 - ljedrz:cleanup_rest_of_const_lifetimes, r=zackmdavis

cleanup: remove static lifetimes from consts

A follow-up to https://github.com/rust-lang/rust/pull/56497.

5 years agoRollup merge of #56446 - arielb1:special-env-implications, r=nikomatsakis
Pietro Albini [Thu, 6 Dec 2018 06:48:56 +0000 (07:48 +0100)]
Rollup merge of #56446 - arielb1:special-env-implications, r=nikomatsakis

pass the parameter environment to `traits::find_associated_item`

dropping the param-env on the floor is obviously the wrong thing to do.

The ICE was probably exposed by #54490 adding the problem-exposing use of
`traits::find_associated_item`.

Fixes #55380.

r? @nikomatsakis

5 years agoRollup merge of #56441 - ollie27:rustbuild_compiler_docs, r=alexcrichton
Pietro Albini [Thu, 6 Dec 2018 06:48:55 +0000 (07:48 +0100)]
Rollup merge of #56441 - ollie27:rustbuild_compiler_docs, r=alexcrichton

rustbuild: Fix issues with compiler docs

* Create output directories for crates beforehand so rustdoc uses relative links (fixes #56107)
* Readd rustc_codegen_ssa (fixes #56196)
* Don't build out of tree dependencies for rustdoc like we don't for rustc

5 years agoRollup merge of #56426 - petrochenkov:syntweak, r=nikomatsakis
Pietro Albini [Thu, 6 Dec 2018 06:48:53 +0000 (07:48 +0100)]
Rollup merge of #56426 - petrochenkov:syntweak, r=nikomatsakis

libsyntax_pos: A few tweaks

5 years agoRollup merge of #56362 - varkor:stabilise-exhaustive-integer-patterns, r=nikomatsakis
Pietro Albini [Thu, 6 Dec 2018 06:48:52 +0000 (07:48 +0100)]
Rollup merge of #56362 - varkor:stabilise-exhaustive-integer-patterns, r=nikomatsakis

Stabilise exhaustive integer patterns

This is dependent on the FCP for https://github.com/rust-lang/rfcs/pull/2591 being completed, but that should happen tomorrow, so there's little harm in opening this PR early.

Closes #50907.

5 years agoRollup merge of #56332 - GuillaumeGomez:specifi-crate-search, r=QuietMisdreavus
Pietro Albini [Thu, 6 Dec 2018 06:48:50 +0000 (07:48 +0100)]
Rollup merge of #56332 - GuillaumeGomez:specifi-crate-search, r=QuietMisdreavus

[rustdoc] Specific crate search

Reopening of #54706.
Fixes #54616.

<img width="1440" alt="screenshot 2018-11-29 at 01 29 11" src="https://user-images.githubusercontent.com/3050060/49191372-979adf80-f376-11e8-963e-e4feb927c1da.png">

r? @QuietMisdreavus

5 years agoRollup merge of #56315 - weiznich:rustdoc_inline_macro_reexport, r=QuietMisdreavus
Pietro Albini [Thu, 6 Dec 2018 06:48:48 +0000 (07:48 +0100)]
Rollup merge of #56315 - weiznich:rustdoc_inline_macro_reexport, r=QuietMisdreavus

Rustdoc inline macro reexport

Fixes #56173

I assume this needs to have tests? Any pointers where these need to be added?

5 years agoAuto merge of #56307 - RalfJung:stacked-borrows-2-phase, r=oli-obk
bors [Thu, 6 Dec 2018 06:30:17 +0000 (06:30 +0000)]
Auto merge of #56307 - RalfJung:stacked-borrows-2-phase, r=oli-obk

Stacked borrows: Support 2 phase borrows

Some infrastructure needed for Stacked Borrows to be able to handle 2-phase-borros.

r? @oli-obk

5 years agoDon't print the profiling summary to stdout when -Zprofile-json is set
Wesley Wiser [Thu, 6 Dec 2018 01:25:00 +0000 (20:25 -0500)]
Don't print the profiling summary to stdout when -Zprofile-json is set

cc rust-lang-nursery/rustc-perf#299

5 years agoAdded explainatory comments
Nathan West [Thu, 6 Dec 2018 01:46:03 +0000 (17:46 -0800)]
Added explainatory comments

5 years agoAuto merge of #54517 - mcr431:53956-panic-on-include_bytes-of-own-file, r=michaelwoer...
bors [Thu, 6 Dec 2018 01:36:51 +0000 (01:36 +0000)]
Auto merge of #54517 - mcr431:53956-panic-on-include_bytes-of-own-file, r=michaelwoerister

53956 panic on include bytes of own file

fix #53956

When using `include_bytes!` on a source file in the project, compiler would panic on subsequent compilations because `expand_include_bytes` would overwrite files in the source_map with no source. This PR changes `expand_include_bytes` to check source_map and use the already existing src, if any.

5 years agoFixed mutability
Nathan West [Wed, 5 Dec 2018 23:11:32 +0000 (15:11 -0800)]
Fixed mutability

5 years agoAuto merge of #56549 - pietroalbini:rollup, r=pietroalbini
bors [Wed, 5 Dec 2018 23:00:36 +0000 (23:00 +0000)]
Auto merge of #56549 - pietroalbini:rollup, r=pietroalbini

Rollup of 15 pull requests

Successful merges:

 - #51753 (Document `From` implementations)
 - #55563 (Improve no result found sentence in doc search)
 - #55987 (Add Weak.ptr_eq)
 - #56119 (Utilize `?` instead of `return None`.)
 - #56372 (Refer to the second borrow as the "second borrow" in E0501.rs)
 - #56388 (More MIR borrow check cleanup)
 - #56424 (Mention raw-ident syntax)
 - #56452 (Remove redundant clones)
 - #56456 (Handle existential types in dead code analysis)
 - #56466 (data_structures: remove tuple_slice)
 - #56476 (Fix invalid line number match)
 - #56497 (cleanup: remove static lifetimes from consts in libstd)
 - #56498 (Fix line numbers display)
 - #56523 (Added a bare-bones eslint config (removing jslint))
 - #56538 (Use inner iterator may_have_side_effect for Cloned)

Failed merges:

r? @ghost

5 years agoRollup merge of #56538 - xfix:patch-13, r=bluss
Pietro Albini [Wed, 5 Dec 2018 22:54:39 +0000 (23:54 +0100)]
Rollup merge of #56538 - xfix:patch-13, r=bluss

Use inner iterator may_have_side_effect for Cloned

Previous implementation wasn't correct, as an inner iterator could have had side effects. Noticed by @bluss in #56534.

5 years agoRollup merge of #56523 - JohnHeitmann:es6, r=GuillaumeGomez
Pietro Albini [Wed, 5 Dec 2018 22:54:38 +0000 (23:54 +0100)]
Rollup merge of #56523 - JohnHeitmann:es6, r=GuillaumeGomez

Added a bare-bones eslint config (removing jslint)

This change removes the small bit of jslint config, replacing it
with eslint. I've currently configured eslint to mostly only report
the more serious of lints, although there are still some style nits
turned on.

Eslint better supports modern js, and will be a good pre-TypeScript code
quality aid.

Install eslint with `npm install -g eslint`. Run with `eslint html/static/*.js`,
or let your IDE do it. This requires no build step.

Upcoming changes will start fixing identified bugs and other lints (mostly unused and var redef issues).

5 years agoRollup merge of #56498 - GuillaumeGomez:line-numbers, r=QuietMisdreavus
Pietro Albini [Wed, 5 Dec 2018 22:54:37 +0000 (23:54 +0100)]
Rollup merge of #56498 - GuillaumeGomez:line-numbers, r=QuietMisdreavus

Fix line numbers display

Thanks to @talchas for finding the bug and suggesting the solution!

r? @QuietMisdreavus

5 years agoRollup merge of #56497 - ljedrz:cleanup_libstd_const_lifetimes, r=kennytm
Pietro Albini [Wed, 5 Dec 2018 22:54:36 +0000 (23:54 +0100)]
Rollup merge of #56497 - ljedrz:cleanup_libstd_const_lifetimes, r=kennytm

cleanup: remove static lifetimes from consts in libstd

5 years agoRollup merge of #56476 - GuillaumeGomez:invalid-line-number-match, r=QuietMisdreavus
Pietro Albini [Wed, 5 Dec 2018 22:54:34 +0000 (23:54 +0100)]
Rollup merge of #56476 - GuillaumeGomez:invalid-line-number-match, r=QuietMisdreavus

Fix invalid line number match

If a code line is longer than the width, it then gets to the next line making the line number not matching it anymore.

r? @QuietMisdreavus

5 years agoRollup merge of #56466 - ljedrz:delete_tuple_slice, r=nikomatsakis
Pietro Albini [Wed, 5 Dec 2018 22:54:33 +0000 (23:54 +0100)]
Rollup merge of #56466 - ljedrz:delete_tuple_slice, r=nikomatsakis

data_structures: remove tuple_slice

It looks like we're not using it anywhere.

5 years agoRollup merge of #56456 - oli-obk:private_impl_trait, r=cramertj
Pietro Albini [Wed, 5 Dec 2018 22:54:32 +0000 (23:54 +0100)]
Rollup merge of #56456 - oli-obk:private_impl_trait, r=cramertj

Handle existential types in dead code analysis

fixes #55124

r? @cramertj

5 years agoRollup merge of #56452 - sinkuu:redundant_clone, r=nikic
Pietro Albini [Wed, 5 Dec 2018 22:54:30 +0000 (23:54 +0100)]
Rollup merge of #56452 - sinkuu:redundant_clone, r=nikic

Remove redundant clones

5 years agoRollup merge of #56424 - mark-i-m:explain-raw, r=Centril
Pietro Albini [Wed, 5 Dec 2018 22:54:29 +0000 (23:54 +0100)]
Rollup merge of #56424 - mark-i-m:explain-raw, r=Centril

Mention raw-ident syntax

According to https://github.com/rust-lang/rust/pull/56419#pullrequestreview-180542790

Blocked on #56419

r? @Centril

5 years agoRollup merge of #56388 - matthewjasper:more-lexical-mir-cleanup, r=nikomatsakis
Pietro Albini [Wed, 5 Dec 2018 22:54:28 +0000 (23:54 +0100)]
Rollup merge of #56388 - matthewjasper:more-lexical-mir-cleanup, r=nikomatsakis

More MIR borrow check cleanup

* Fix some rustc doc links
* Remove the `region_map` field from `BorrowSet`
*  Use `visit_local` to find 2PB activations

r? @nikomatsakis

5 years agoRollup merge of #56372 - wildarch:issue-55314-second-borrow-ref, r=davidtwco
Pietro Albini [Wed, 5 Dec 2018 22:54:27 +0000 (23:54 +0100)]
Rollup merge of #56372 - wildarch:issue-55314-second-borrow-ref, r=davidtwco

Refer to the second borrow as the "second borrow" in E0501.rs

Fixes #55314.

r? @davidtwco

5 years agoRollup merge of #56119 - frewsxcv:frewsxcv-option-carrier, r=TimNN
Pietro Albini [Wed, 5 Dec 2018 22:54:25 +0000 (23:54 +0100)]
Rollup merge of #56119 - frewsxcv:frewsxcv-option-carrier, r=TimNN

Utilize `?` instead of `return None`.

None

5 years agoRollup merge of #55987 - Thomasdezeeuw:weak-ptr_eq, r=sfackler
Pietro Albini [Wed, 5 Dec 2018 22:54:24 +0000 (23:54 +0100)]
Rollup merge of #55987 - Thomasdezeeuw:weak-ptr_eq, r=sfackler

Add Weak.ptr_eq

I hope the doc tests alone are good enough.

We also might want to discuss the dangling pointer case (from `Weak::new()`).

Updates #55981.

5 years agoRollup merge of #55563 - GuillaumeGomez:doc-search-sentence, r=QuietMisdreavus
Pietro Albini [Wed, 5 Dec 2018 22:54:22 +0000 (23:54 +0100)]
Rollup merge of #55563 - GuillaumeGomez:doc-search-sentence, r=QuietMisdreavus

Improve no result found sentence in doc search

Fixes #55531.

Look:

<img width="1440" alt="screenshot 2018-11-01 at 02 21 56" src="https://user-images.githubusercontent.com/3050060/47827257-f6236c80-dd7c-11e8-9ea9-99c8cb4b2de5.png">

r? @QuietMisdreavus

5 years agoRollup merge of #51753 - gruberb:document-from-conversions-libstdpath, r=QuietMisdreavus
Pietro Albini [Wed, 5 Dec 2018 22:54:21 +0000 (23:54 +0100)]
Rollup merge of #51753 - gruberb:document-from-conversions-libstdpath, r=QuietMisdreavus

Document `From` implementations

This PR is solves part of https://github.com/rust-lang/rust/issues/51430. It's my first PR, so I might need some guidance from @skade (as already mentioned in the issue).

The purpose of the PR is to document the `impl From` inside `path.rs` and answering the questions:
- What does it convert?
- Does it allocate memory?
- How expensive are the allocations?

I gave it a first shot, though an experienced rust developer might want to look over it.

5 years agoOptimized string FromIterator impls
Nathan West [Wed, 5 Dec 2018 22:37:38 +0000 (14:37 -0800)]
Optimized string FromIterator impls

5 years agoFix precise_pointer_size_matching tests on all platforms
varkor [Wed, 5 Dec 2018 22:21:56 +0000 (23:21 +0100)]
Fix precise_pointer_size_matching tests on all platforms

5 years agoAuto merge of #55933 - euclio:doc-panic, r=QuietMisdreavus
bors [Wed, 5 Dec 2018 20:27:17 +0000 (20:27 +0000)]
Auto merge of #55933 - euclio:doc-panic, r=QuietMisdreavus

emit error when doc generation fails

Fixes #41813.

The diagnostic looks something like this:

```
error: couldn't generate documentation: No space left on device (os error 28)
  |
  = note: failed to create or modify "/path/to/crate/target/doc/src/lazycell"
```

5 years agoAuto merge of #56535 - matthiaskrgr:clippy, r=oli-obk
bors [Wed, 5 Dec 2018 17:54:17 +0000 (17:54 +0000)]
Auto merge of #56535 - matthiaskrgr:clippy, r=oli-obk

submodules: update clippy from b2601beb to 29bf75cd

Changes:
````
Fix ty::TyKind usage
Fix TyKind::<kind> usage in codebase
Extract single_match_else UI test
cargo fmt
Adds inequality cases to bool comparison lint
Remove unsafe_vector_initialization lint
Fix wildcard_dependencies false positive
Fix rustfmt format
Disable incremental build for windows
Travis: Add rustc sysroot bin to PATH for windows build
Fix some nursery links
Enforce LF lineendings for everything
Mention triage procedure in contributing.md
Keep testing large_digit_groups as ui test
Keep testing unsafe_vector_initialization as ui test
Downgrade large_digit_groups to pedantic
Downgrade unsafe_vector_initialization to restriction
remove macro_at_most_once_rep feature attribute since it's stable
Add missing word
Update docs in regards to the merged RFC
Document how to run rustfmt in CONTRIBUTING.md
Don't run integration tests in forks
Fix some formatting issues
Run rustfmt on clippy_lints
Run rustfmt on build.rs
Run rustfmt on clippy_dev
Run rustfmt on rustc_tools_util
Run rustfmt on src
Run rustfmt on the tests
Let travis run cargo fmt --all -- --check
Error on line overflow
````

No need to increase priority, please just rollup :)

5 years agoAdd a test for cloned side effects
Konrad Borowski [Wed, 5 Dec 2018 16:53:34 +0000 (17:53 +0100)]
Add a test for cloned side effects

5 years agoUse inner iterator may_have_side_effect for Cloned
Konrad Borowski [Wed, 5 Dec 2018 15:44:10 +0000 (16:44 +0100)]
Use inner iterator may_have_side_effect for Cloned

Previous implementation wasn't correct, as an inner iterator
could have had side effects.

5 years agoemit error when doc generation fails
Andy Russell [Tue, 13 Nov 2018 18:43:50 +0000 (13:43 -0500)]
emit error when doc generation fails

Fixes #41813.

5 years agosubmodules: update clippy from b2601beb to 29bf75cd
Matthias Krüger [Wed, 5 Dec 2018 14:31:30 +0000 (15:31 +0100)]
submodules: update clippy from b2601beb to 29bf75cd

Changes:
````
Fix ty::TyKind usage
Fix TyKind::<kind> usage in codebase
Extract single_match_else UI test
cargo fmt
Adds inequality cases to bool comparison lint
Remove unsafe_vector_initialization lint
Fix wildcard_dependencies false positive
Fix rustfmt format
Disable incremental build for windows
Travis: Add rustc sysroot bin to PATH for windows build
Fix some nursery links
Enforce LF lineendings for everything
Mention triage procedure in contributing.md
Keep testing large_digit_groups as ui test
Keep testing unsafe_vector_initialization as ui test
Downgrade large_digit_groups to pedantic
Downgrade unsafe_vector_initialization to restriction
remove macro_at_most_once_rep feature attribute since it's stable
Add missing word
Update docs in regards to the merged RFC
Document how to run rustfmt in CONTRIBUTING.md
Don't run integration tests in forks
Fix some formatting issues
Run rustfmt on clippy_lints
Run rustfmt on build.rs
Run rustfmt on clippy_dev
Run rustfmt on rustc_tools_util
Run rustfmt on src
Run rustfmt on the tests
Let travis run cargo fmt --all -- --check
Error on line overflow
````

5 years agoAuto merge of #55466 - sinkuu:cleanup, r=petrochenkov
bors [Wed, 5 Dec 2018 13:56:07 +0000 (13:56 +0000)]
Auto merge of #55466 - sinkuu:cleanup, r=petrochenkov

syntax: Use iterator and pattern APIs instead of `char_at`

Iterating over chars with the `char_at(str, i)` `i += ch.len_utf8()` loop seems unidiomatic.

5 years agoAuto merge of #55922 - oli-obk:slice_pat_ice, r=zackmdavis
bors [Wed, 5 Dec 2018 07:16:17 +0000 (07:16 +0000)]
Auto merge of #55922 - oli-obk:slice_pat_ice, r=zackmdavis

Fix ICE in `const` slice patterns

fixes #55911

based on https://github.com/rust-lang/rust/pull/55915

New commits start at eabc1551e0d0953f1951020afb5919ab4c129cf5

5 years agoRemove unused dependency (rustc_lint -> rustc_mir)
Shotaro Yamada [Wed, 5 Dec 2018 05:06:32 +0000 (14:06 +0900)]
Remove unused dependency (rustc_lint -> rustc_mir)

5 years agoFix pretty test
Shotaro Yamada [Wed, 5 Dec 2018 03:15:28 +0000 (12:15 +0900)]
Fix pretty test

5 years agoAuto merge of #56519 - steveklabnik:edition-guide, r=pietroalbini
bors [Wed, 5 Dec 2018 02:24:35 +0000 (02:24 +0000)]
Auto merge of #56519 - steveklabnik:edition-guide, r=pietroalbini

update edition guide

spiritual successor to https://github.com/rust-lang/rust/pull/56457

not to be backported, being in nightly is enough.

i'm testing this locally now but figure travis can test it in parallel

5 years agoAvoid extra copy and syscall in std::env::current_exe
John-John Tedro [Wed, 5 Dec 2018 01:48:18 +0000 (02:48 +0100)]
Avoid extra copy and syscall in std::env::current_exe

5 years agoadds DocTest filename variant, refactors doctest_offset out of source_map, fixes...
Matthew Russo [Tue, 4 Dec 2018 20:18:03 +0000 (15:18 -0500)]
adds DocTest filename variant, refactors doctest_offset out of source_map, fixes remaining test failures

5 years agoAdded trailing newline
John Heitmann [Wed, 5 Dec 2018 00:13:04 +0000 (16:13 -0800)]
Added trailing newline

5 years agoAdded a bare-bones eslint config (removing jslint)
John Heitmann [Tue, 4 Dec 2018 21:59:27 +0000 (13:59 -0800)]
Added a bare-bones eslint config (removing jslint)

This change removes the small bit of jslint config, replacing it
with eslint. I've currently configured eslint to mostly only report
the more serious of lints, although there are still some style nits
turned on.

Upcoming changes will start fixing lints.

5 years agoupdates all Filename variants to take a fingerprint
Matthew Russo [Tue, 30 Oct 2018 14:11:24 +0000 (10:11 -0400)]
updates all Filename variants to take a fingerprint

5 years agonew_source_file no longer enters duplicate files, expand_include_bytes includes the...
Matthew Russo [Tue, 30 Oct 2018 14:10:42 +0000 (10:10 -0400)]
new_source_file no longer enters duplicate files, expand_include_bytes includes the source if it can convert bytes to string

5 years agobuild the edition guide
Steve Klabnik [Tue, 4 Dec 2018 21:47:46 +0000 (16:47 -0500)]
build the edition guide

and update it so that links are correct

5 years agoAuto merge of #56486 - matthewjasper:propagate-all-closure-bounds, r=pnkfelix
bors [Tue, 4 Dec 2018 20:56:11 +0000 (20:56 +0000)]
Auto merge of #56486 - matthewjasper:propagate-all-closure-bounds, r=pnkfelix

Propagate all closure requirements to the caller

Closes #56477

This should be backported to 1.32 if it doesn't make the cut.

r? @pnkfelix
cc @nikomatsakis

5 years agoCall methods on the right tcx
Matthew Jasper [Tue, 4 Dec 2018 19:14:13 +0000 (19:14 +0000)]
Call methods on the right tcx

There are two `TyCtxt`s, one global, one local. Methods must be called
on the right one, as they differ by invariant lifetimes.

5 years agoUtilize `?` instead of `return None`.
Corey Farwell [Wed, 21 Nov 2018 04:01:56 +0000 (23:01 -0500)]
Utilize `?` instead of `return None`.

5 years agoAuto merge of #56244 - oli-obk:loud_ui_errors, r=nikomatsakis
bors [Tue, 4 Dec 2018 16:26:18 +0000 (16:26 +0000)]
Auto merge of #56244 - oli-obk:loud_ui_errors, r=nikomatsakis

Report failing tests without `//~ ERROR` comments

r? @nikomatsakis

5 years agoAuto merge of #55871 - ljedrz:llvm_back_allocations, r=nagisa
bors [Tue, 4 Dec 2018 11:47:07 +0000 (11:47 +0000)]
Auto merge of #55871 - ljedrz:llvm_back_allocations, r=nagisa

codegen_llvm_back: improve allocations

This commit was split out from https://github.com/rust-lang/rust/pull/54864. Last time it was causing an LLVM OOM, which was most probably caused by not collecting the globals.

- preallocate vectors of known length
- `extend` instead of `append` where the argument is consumable
- turn 2 `push` loops into `extend`s
- create a vector from a function producing one instead of using `extend_from_slice` on it
- consume `modules` when no longer needed
- ~~return an `impl Iterator` from `generate_lto_work`~~
- ~~don't `collect` `globals`, as they are iterated over and consumed right afterwards~~

While I'm hoping it won't cause an OOM anymore, I would still consider this a "high-risk" PR and not roll it up.

5 years agocleanup: remove static lifetimes from consts
ljedrz [Tue, 4 Dec 2018 11:46:10 +0000 (12:46 +0100)]
cleanup: remove static lifetimes from consts

5 years agoFix line numbers display
Guillaume Gomez [Tue, 4 Dec 2018 10:33:57 +0000 (11:33 +0100)]
Fix line numbers display

5 years agoTidy fixup
Oliver Scherer [Tue, 4 Dec 2018 10:04:54 +0000 (11:04 +0100)]
Tidy fixup

5 years agoAdd a test case for inlining the docs of a macro reexport
Georg Semmler [Tue, 4 Dec 2018 09:24:17 +0000 (10:24 +0100)]
Add a test case for inlining the docs of a macro reexport

5 years agoRemove support for proc macro doc inlining
Georg Semmler [Tue, 4 Dec 2018 09:23:30 +0000 (10:23 +0100)]
Remove support for proc macro doc inlining

5 years agoAllow renaming macro
Georg Semmler [Tue, 4 Dec 2018 09:23:13 +0000 (10:23 +0100)]
Allow renaming macro

5 years agocleanup: remove static lifetimes from consts in libstd
ljedrz [Tue, 4 Dec 2018 09:21:42 +0000 (10:21 +0100)]
cleanup: remove static lifetimes from consts in libstd

5 years agoAuto merge of #56224 - ehuss:update-cargo, r=alexcrichton
bors [Tue, 4 Dec 2018 09:21:21 +0000 (09:21 +0000)]
Auto merge of #56224 - ehuss:update-cargo, r=alexcrichton

Update cargo, rls

26 commits in b3d0b2e545b61d4cd08096911724b7d49d213f73..5e85ba14aaa20f8133863373404cb0af69eeef2c
2018-11-15 19:13:04 +0000 to 2018-12-02 14:37:25 +0000
- ConflictStoreTrie: Faster filtered search (rust-lang/cargo#6366)
- Remove `cmake` as a requirement (rust-lang/cargo#6368)
- progress: display "Downloading 1 crate" instead of "Downloading 1 crates" (rust-lang/cargo#6369)
- Use expect over unwrap, for panic-in-panic aborts (rust-lang/cargo#6364)
- Switch to pretty_env_logger, under --features pretty-env-logger (rust-lang/cargo#6362)
- use allow-dirty option in `cargo package` to skip vcs checks (rust-lang/cargo#6280)
- remove clones made redundant by Intern PackageId (rust-lang/cargo#6352)
- docs: correct profile usage of `cargo test --release` (rust-lang/cargo#6345)
- Improve doc for `cargo install` (rust-lang/cargo#6354)
- Intern PackageId (rust-lang/cargo#6332)
- Clean only release artifacts if --release option is set (rust-lang/cargo#6349)
- remove clones made redundant by Intern SourceId (rust-lang/cargo#6347)
- Intern SourceId (rust-lang/cargo#6342)
- Tweak Layout to allow for non json file targets with internal "." (rust-lang/cargo#6255)
- Correct Target Directory command-line option (rust-lang/cargo#6343)
- Persistent data structures by im-rs (rust-lang/cargo#6336)
- Move command prelude into main library (rust-lang/cargo#6335)
- Distinguish custom build invocations (rust-lang/cargo#6331)
- Allow crate_type=bin examples to run (rust-lang/cargo#6330)
- Make verify-project honour unstable features (rust-lang/cargo#6326)
- Make autodiscovery disable inferred targets (rust-lang/cargo#6329)
- Add `c` alias for `check` (rust-lang/cargo#6218)
- Allow user aliases to override built-in aliases (rust-lang/cargo#6259)
- Fix renaming directory project using build scripts with cross-compiling. (rust-lang/cargo#6328)
- Fix add_plugin_deps-related tests. (rust-lang/cargo#6327)
- Add a glossary. (rust-lang/cargo#6321)

5 years agoIntrinsic checks are just needed for `qualify_min_const_fn`
Oliver Scherer [Sat, 1 Dec 2018 13:09:30 +0000 (14:09 +0100)]
Intrinsic checks are just needed for `qualify_min_const_fn`

5 years agoClear up some code
Oliver Scherer [Fri, 30 Nov 2018 17:18:42 +0000 (18:18 +0100)]
Clear up some code

5 years agoExplain unsafety trickery of const functions
Oliver Scherer [Fri, 30 Nov 2018 17:17:50 +0000 (18:17 +0100)]
Explain unsafety trickery of const functions

5 years agoClean up the logic in `is_min_const_fn`
Oliver Scherer [Fri, 30 Nov 2018 17:07:51 +0000 (18:07 +0100)]
Clean up the logic in `is_min_const_fn`

5 years agoAdd and update tests
Oliver Scherer [Mon, 19 Nov 2018 14:24:23 +0000 (15:24 +0100)]
Add and update tests

5 years agoAutomatically generate imports for newtype_index `Deserialize` impls
Oliver Scherer [Mon, 19 Nov 2018 14:24:03 +0000 (15:24 +0100)]
Automatically generate imports for newtype_index `Deserialize` impls

5 years agoIncrease code-reuse and -readability
Oliver Scherer [Mon, 19 Nov 2018 13:45:40 +0000 (14:45 +0100)]
Increase code-reuse and -readability

5 years agoAdd tests for stable unsafe features in const fn
Oliver Scherer [Tue, 6 Nov 2018 16:43:32 +0000 (17:43 +0100)]
Add tests for stable unsafe features in const fn

5 years agoEmit feature gate suggestion
Oliver Scherer [Mon, 5 Nov 2018 17:06:26 +0000 (18:06 +0100)]
Emit feature gate suggestion

5 years agoComment on the unsafety code for layout constrained fields
Oliver Scherer [Mon, 5 Nov 2018 12:29:17 +0000 (13:29 +0100)]
Comment on the unsafety code for layout constrained fields

5 years agoAlso prevent mutation fields directly
Oliver Scherer [Mon, 5 Nov 2018 12:26:07 +0000 (13:26 +0100)]
Also prevent mutation fields directly

5 years agoAlso make immutable references to non-freeze restricted value range types unsafe
Oliver Scherer [Sun, 4 Nov 2018 12:45:26 +0000 (13:45 +0100)]
Also make immutable references to non-freeze restricted value range types unsafe

5 years agogeneralize the message about the creation of layout restricted types
Oliver Scherer [Sun, 4 Nov 2018 11:48:51 +0000 (12:48 +0100)]
generalize the message about the creation of layout restricted types

5 years agoAdjust a rustc test to the safety changes
Oliver Scherer [Sun, 4 Nov 2018 11:22:58 +0000 (12:22 +0100)]
Adjust a rustc test to the safety changes

5 years agoTrailing newlines again
Oliver Scherer [Sat, 3 Nov 2018 22:39:29 +0000 (23:39 +0100)]
Trailing newlines again

5 years agoForbid the creation of mutable borrows to fields of layout constrained types
Oliver Scherer [Sat, 3 Nov 2018 15:30:05 +0000 (16:30 +0100)]
Forbid the creation of mutable borrows to fields of layout constrained types

5 years agoMove ref to packed struct field check into projection arm
Oliver Scherer [Sat, 3 Nov 2018 14:21:44 +0000 (15:21 +0100)]
Move ref to packed struct field check into projection arm

5 years agoMake `newtype_index` safe
Oliver Scherer [Sat, 3 Nov 2018 14:08:27 +0000 (15:08 +0100)]
Make `newtype_index` safe

5 years agoMake sure the initialization of constrained int range newtypes is unsafe
Oliver Scherer [Sat, 3 Nov 2018 12:03:05 +0000 (13:03 +0100)]
Make sure the initialization of constrained int range newtypes is unsafe

5 years agoAdd test for dereferencing raw pointers and immediately referencing again
Oliver Scherer [Sat, 3 Nov 2018 11:08:19 +0000 (12:08 +0100)]
Add test for dereferencing raw pointers and immediately referencing again

5 years agoDocument unsafe rules with comments and `bug!` calls
Oliver Scherer [Sat, 3 Nov 2018 10:09:52 +0000 (11:09 +0100)]
Document unsafe rules with comments and `bug!` calls

5 years agoAllow calling `const unsafe fn` in `const fn` behind a feature gate
Oliver Scherer [Fri, 2 Nov 2018 23:22:12 +0000 (00:22 +0100)]
Allow calling `const unsafe fn` in `const fn` behind a feature gate

5 years agoAdd extra comment slash
Bastian Gruber [Tue, 4 Dec 2018 09:10:07 +0000 (10:10 +0100)]
Add extra comment slash

5 years agoUpdate doc-ui tests
Oliver Scherer [Fri, 30 Nov 2018 15:20:07 +0000 (16:20 +0100)]
Update doc-ui tests

5 years agoUpdate ui tests
Oliver Scherer [Fri, 30 Nov 2018 08:41:26 +0000 (09:41 +0100)]
Update ui tests

5 years agoRemove unused stderr file
Oliver Scherer [Tue, 27 Nov 2018 11:13:49 +0000 (12:13 +0100)]
Remove unused stderr file

5 years agoNewlines.... newlines everywhere
Oliver Scherer [Tue, 27 Nov 2018 10:29:29 +0000 (11:29 +0100)]
Newlines.... newlines everywhere

5 years agoAdd a test ensuring that we don't regress this
Oliver Scherer [Tue, 27 Nov 2018 09:56:49 +0000 (10:56 +0100)]
Add a test ensuring that we don't regress this

5 years agoUpdate tests
Oliver Scherer [Tue, 27 Nov 2018 09:56:36 +0000 (10:56 +0100)]
Update tests