]> git.lizzy.rs Git - rust.git/log
rust.git
5 years agoAdd the edition guide to doc.rust-lang.org
Steve Klabnik [Fri, 30 Nov 2018 14:36:49 +0000 (09:36 -0500)]
Add the edition guide to doc.rust-lang.org

5 years agoupdate nomicon
Steve Klabnik [Fri, 30 Nov 2018 14:29:36 +0000 (09:29 -0500)]
update nomicon

5 years agoAuto merge of #49219 - eddyb:proc-macro-decouple, r=alexcrichton
bors [Fri, 30 Nov 2018 06:44:14 +0000 (06:44 +0000)]
Auto merge of #49219 - eddyb:proc-macro-decouple, r=alexcrichton

Decouple proc_macro from the rest of the compiler.

This PR removes all dependencies of `proc_macro` on compiler crates and allows multiple copies of `proc_macro`, built even by different compilers (but from the same source), to interoperate.

Practically, it allows:
* running proc macro tests at stage1 (I moved most from `-fulldeps` to the regular suites)
* using proc macros in the compiler itself (may require some rustbuild trickery)

On the server (i.e. compiler front-end) side:
* `server::*` traits are implemented to provide the concrete types and methods
  * the concrete types are completely separated from the `proc_macro` public API
  * the only use of the type implementing `Server` is to be passed to `Client::run`

On the client (i.e. proc macro) side (potentially using a different `proc_macro` instance!):
* `client::Client` wraps around client-side (expansion) function pointers
  * it encapsulates the `proc_macro` instance used by the client
  * its `run` method can be called by a server, to execute the client-side function
    * the client instance is bridged to the provided server, while it runs
    * ~~currently a thread is spawned, could use process isolation in the future~~
(not the case anymore, see #56058)
* proc macro crates get a generated `static` holding a `&[ProcMacro]`
  * this describes all derives/attr/bang proc macros, replacing the "registrar" function
  * each variant of `ProcMacro` contains an appropriately typed `Client<fn(...) -> ...>`

`proc_macro` public APIs call into the server via an internal "bridge":
* only a currently running proc macro `Client` can interact with those APIs
  * server code might not be able to (if it uses a different `proc_macro` instance)
    * however, it can always create and `run` its own `Client`, but that may be inefficient
* the `bridge` uses serialization, C ABI and integer handles to avoid Rust ABI instability
* each invocation of a proc macro results in disjoint integers in its `proc_macro` handles
  * this prevents using values of those types across invocations (if they even can be kept)

r? @alexcrichton cc @jseyfried @nikomatsakis @Zoxc @thepowersgang

5 years agobootstrap: provide host `rust_test_helpers` to compiletest, not just target.
Eduard-Mihai Burtescu [Tue, 27 Nov 2018 13:40:40 +0000 (15:40 +0200)]
bootstrap: provide host `rust_test_helpers` to compiletest, not just target.

5 years agotests: ignore wasm32 for run-pass/proc-macro/expand-with-a-macro.
Eduard-Mihai Burtescu [Tue, 27 Nov 2018 02:42:20 +0000 (04:42 +0200)]
tests: ignore wasm32 for run-pass/proc-macro/expand-with-a-macro.

5 years agotests: use alloc instead of libc in unnecessary-extern-crate, to make it work on...
Eduard-Mihai Burtescu [Mon, 26 Nov 2018 14:28:42 +0000 (16:28 +0200)]
tests: use alloc instead of libc in unnecessary-extern-crate, to make it work on wasm.

5 years agocompiletest: don't pass -Clinker when `// force-host` was requested.
Eduard-Mihai Burtescu [Mon, 26 Nov 2018 11:04:26 +0000 (13:04 +0200)]
compiletest: don't pass -Clinker when `// force-host` was requested.

5 years agotests: use a #![no_std] target crate in run-make/rustc-macro-dep-files.
Eduard-Mihai Burtescu [Mon, 26 Nov 2018 02:07:55 +0000 (04:07 +0200)]
tests: use a #![no_std] target crate in run-make/rustc-macro-dep-files.

5 years agobootstrap: don't use libraries from MUSL_ROOT on non-musl targets.
Eduard-Mihai Burtescu [Sun, 25 Nov 2018 12:08:06 +0000 (14:08 +0200)]
bootstrap: don't use libraries from MUSL_ROOT on non-musl targets.

5 years agotests: support cross-compilation in run-make/rustc-macro-dep-files.
Eduard-Mihai Burtescu [Sun, 25 Nov 2018 02:43:00 +0000 (04:43 +0200)]
tests: support cross-compilation in run-make/rustc-macro-dep-files.

5 years agobootstrap: ensure that `libproc_macro` is available on the host for tests even when...
Eduard-Mihai Burtescu [Wed, 16 May 2018 12:38:32 +0000 (15:38 +0300)]
bootstrap: ensure that `libproc_macro` is available on the host for tests even when cross-compiling.

5 years agotests: use `force-host` and `no-prefer-dynamic` in all proc_macro tests.
Eduard-Mihai Burtescu [Sat, 24 Nov 2018 13:34:13 +0000 (15:34 +0200)]
tests: use `force-host` and `no-prefer-dynamic` in all proc_macro tests.

5 years agotests: move all proc_macro tests from -fulldeps.
Eduard-Mihai Burtescu [Tue, 20 Mar 2018 20:19:52 +0000 (22:19 +0200)]
tests: move all proc_macro tests from -fulldeps.

5 years agotests: remove ignore-stage1 where possible in proc_macro tests.
Eduard-Mihai Burtescu [Tue, 20 Mar 2018 18:20:03 +0000 (20:20 +0200)]
tests: remove ignore-stage1 where possible in proc_macro tests.

5 years agoStatically link proc_macro into proc macros.
Eduard-Mihai Burtescu [Thu, 26 Apr 2018 11:11:08 +0000 (14:11 +0300)]
Statically link proc_macro into proc macros.

5 years agoproc_macro: move to a dependency of libtest.
Eduard-Mihai Burtescu [Tue, 20 Mar 2018 18:43:33 +0000 (20:43 +0200)]
proc_macro: move to a dependency of libtest.

5 years agoproc_macro: move the rustc server to syntax_ext.
Eduard-Mihai Burtescu [Tue, 20 Mar 2018 14:41:14 +0000 (16:41 +0200)]
proc_macro: move the rustc server to syntax_ext.

5 years agoproc_macro: remove the __internal module.
Eduard-Mihai Burtescu [Mon, 19 Mar 2018 20:44:24 +0000 (22:44 +0200)]
proc_macro: remove the __internal module.

5 years agoproc_macro: introduce a "bridge" between clients (proc macros) and servers (compiler...
Eduard-Mihai Burtescu [Thu, 15 Mar 2018 23:09:22 +0000 (01:09 +0200)]
proc_macro: introduce a "bridge" between clients (proc macros) and servers (compiler front-ends).

5 years agoAuto merge of #49878 - dlrobertson:va_list_pt0, r=eddyb
bors [Thu, 29 Nov 2018 19:28:21 +0000 (19:28 +0000)]
Auto merge of #49878 - dlrobertson:va_list_pt0, r=eddyb

libcore: Add VaList and variadic arg handling intrinsics

## Summary

 - Add intrinsics for `va_start`, `va_end`, `va_copy`, and `va_arg`.
 - Add `core::va_list::VaList` to `libcore`.

Part 1 of (at least) 3 for #44930

Comments and critiques are very much welcomed 😄

5 years agoAuto merge of #56298 - tromey:update-and-reenable-lldb, r=alexcrichton
bors [Thu, 29 Nov 2018 15:24:20 +0000 (15:24 +0000)]
Auto merge of #56298 - tromey:update-and-reenable-lldb, r=alexcrichton

Re-enable lldb

Commit 7215963e56 disabled lldb due to the LLVM update.  This patch
updates lldb to build against the Rust LLVM, and re-enables it.

5 years agoAuto merge of #56340 - GuillaumeGomez:rollup, r=GuillaumeGomez
bors [Thu, 29 Nov 2018 12:23:05 +0000 (12:23 +0000)]
Auto merge of #56340 - GuillaumeGomez:rollup, r=GuillaumeGomez

Rollup of 22 pull requests

Successful merges:

 - #55391 (bootstrap: clean up a few clippy findings)
 - #56021 (avoid features_untracked)
 - #56023 (atomic::Ordering: Get rid of misleading parts of intro)
 - #56080 (Reduce the amount of bold text at doc.rlo)
 - #56114 (Enclose type in backticks for "non-exhaustive patterns" error)
 - #56124 (Fix small doc mistake on std::io::read::read_to_end)
 - #56127 (Update an outdated comment in mir building)
 - #56148 (Add rustc-guide as a submodule)
 - #56149 (Make std::os::unix/linux::fs::MetadataExt::a/m/ctime* documentation clearer)
 - #56220 (Suggest appropriate place for lifetime when declared after type arguments)
 - #56223 (Make JSON output from -Zprofile-json valid)
 - #56236 (Remove unsafe `unsafe` inner function.)
 - #56255 (Update outdated code comments in StringReader)
 - #56257 (rustc-guide has moved to rust-lang/)
 - #56273 (Add missing doc link)
 - #56289 (Fix small typo in comment of thread::stack_size)
 - #56294 (Fix a typo in the documentation of std::ffi)
 - #56312 (Deduplicate literal -> constant lowering)
 - #56319 (fix futures creating aliasing mutable and shared ref)
 - #56321 (rustdoc: add bottom margin spacing to nested lists)
 - #56322 (resolve: Fix false-positives from lint `absolute_paths_not_starting_with_crate`)
 - #56330 (Clean up span in non-trailing `..` suggestion)

Failed merges:

r? @ghost

5 years agoRollup merge of #56330 - estebank:cleanup-span, r=zackmdavis
Guillaume Gomez [Thu, 29 Nov 2018 12:10:54 +0000 (13:10 +0100)]
Rollup merge of #56330 - estebank:cleanup-span, r=zackmdavis

Clean up span in non-trailing `..` suggestion

5 years agoRollup merge of #56322 - petrochenkov:edlints, r=eddyb
Guillaume Gomez [Thu, 29 Nov 2018 12:10:53 +0000 (13:10 +0100)]
Rollup merge of #56322 - petrochenkov:edlints, r=eddyb

resolve: Fix false-positives from lint `absolute_paths_not_starting_with_crate`

Fixes https://github.com/rust-lang/rust/issues/56311 (stable-to-beta regression)

5 years agoRollup merge of #56321 - jnqnfe:css_nested_list_margin, r=GuillaumeGomez
Guillaume Gomez [Thu, 29 Nov 2018 12:10:52 +0000 (13:10 +0100)]
Rollup merge of #56321 - jnqnfe:css_nested_list_margin, r=GuillaumeGomez

rustdoc: add bottom margin spacing to nested lists

the current CSS for nested lists sets margin-bottom to zero, which means that a nested list is squished up against subsequent list items/paragraphs

this changes the bottom margin to .6em, same as for paragraphs

before:
![before](https://user-images.githubusercontent.com/33935229/49176291-699ba800-f342-11e8-9d33-c4acd4df2beb.png)
after:
![after](https://user-images.githubusercontent.com/33935229/49176299-6f918900-f342-11e8-90c3-aa14db195b45.png)

5 years agoRollup merge of #56319 - RalfJung:async-mutable-ref, r=cramertj
Guillaume Gomez [Thu, 29 Nov 2018 12:10:50 +0000 (13:10 +0100)]
Rollup merge of #56319 - RalfJung:async-mutable-ref, r=cramertj

fix futures creating aliasing mutable and shared ref

Fixes the problem described in https://github.com/solson/miri/issues/532#issuecomment-442552764: `set_task_waker` takes a shared reference and puts a copy into the TLS (in a `NonNull`), but `get_task_waker` gets it back out as a mutable reference. That violates "mutable references must not alias anything"!

5 years agoRollup merge of #56312 - oli-obk:const_eval_literal, r=eddyb
Guillaume Gomez [Thu, 29 Nov 2018 12:10:49 +0000 (13:10 +0100)]
Rollup merge of #56312 - oli-obk:const_eval_literal, r=eddyb

Deduplicate literal -> constant lowering

5 years agoRollup merge of #56294 - polyfloyd:fix-typo-ffi-doc, r=sfackler
Guillaume Gomez [Thu, 29 Nov 2018 12:10:48 +0000 (13:10 +0100)]
Rollup merge of #56294 - polyfloyd:fix-typo-ffi-doc, r=sfackler

Fix a typo in the documentation of std::ffi

5 years agoRollup merge of #56289 - marius:patch-1, r=cramertj
Guillaume Gomez [Thu, 29 Nov 2018 12:10:46 +0000 (13:10 +0100)]
Rollup merge of #56289 - marius:patch-1, r=cramertj

Fix small typo in comment of thread::stack_size

5 years agoRollup merge of #56273 - GuillaumeGomez:iterator-fnmut-missing-link, r=steveklabnik
Guillaume Gomez [Thu, 29 Nov 2018 12:10:45 +0000 (13:10 +0100)]
Rollup merge of #56273 - GuillaumeGomez:iterator-fnmut-missing-link, r=steveklabnik

Add missing doc link

r? @steveklabnik

5 years agoRollup merge of #56257 - mark-i-m:rustc-guide-links, r=nikomatsakis
Guillaume Gomez [Thu, 29 Nov 2018 12:10:44 +0000 (13:10 +0100)]
Rollup merge of #56257 - mark-i-m:rustc-guide-links, r=nikomatsakis

rustc-guide has moved to rust-lang/

r? @nikomatsakis

5 years agoRollup merge of #56255 - jasonl:update-old-documents, r=michaelwoerister
Guillaume Gomez [Thu, 29 Nov 2018 12:10:43 +0000 (13:10 +0100)]
Rollup merge of #56255 - jasonl:update-old-documents, r=michaelwoerister

Update outdated code comments in StringReader

For the detection of newlines in the lexer, this is now done in `analyze_source_file.rs`.

5 years agoRollup merge of #56236 - frewsxcv:frewsxcv-unsafe-unsafe, r=cramertj
Guillaume Gomez [Thu, 29 Nov 2018 12:10:41 +0000 (13:10 +0100)]
Rollup merge of #56236 - frewsxcv:frewsxcv-unsafe-unsafe, r=cramertj

Remove unsafe `unsafe` inner function.

Within this `Iterator` implementation, a function `unsafe_get` is
defined which unsafely allows _unchecked_ indexing of any element in a
slice. This should be marked as _unsafe_, but it is not.

To address this issue, I removed that inner function.

5 years agoRollup merge of #56223 - Mark-Simulacrum:self-profile-json, r=wesleywiser
Guillaume Gomez [Thu, 29 Nov 2018 12:10:40 +0000 (13:10 +0100)]
Rollup merge of #56223 - Mark-Simulacrum:self-profile-json, r=wesleywiser

Make JSON output from -Zprofile-json valid

r? @wesleywiser

cc https://github.com/rust-lang-nursery/rustc-perf/issues/299

5 years agoRollup merge of #56220 - estebank:suggest-lifetime-move, r=nikomatsakis
Guillaume Gomez [Thu, 29 Nov 2018 12:10:39 +0000 (13:10 +0100)]
Rollup merge of #56220 - estebank:suggest-lifetime-move, r=nikomatsakis

Suggest appropriate place for lifetime when declared after type arguments

5 years agoRollup merge of #56149 - ariasuni:improve-amctime-doc, r=TimNN
Guillaume Gomez [Thu, 29 Nov 2018 12:10:38 +0000 (13:10 +0100)]
Rollup merge of #56149 - ariasuni:improve-amctime-doc, r=TimNN

Make std::os::unix/linux::fs::MetadataExt::a/m/ctime* documentation clearer

I was confused by this API so I clarified what they are doing.

I was wondering if I should try to unify more documentation and examples between `unix` and `linux` (e.g. “of the file” is used in `unix` to refer to the file these metadata is for, “of this file” in `linux`, “of the underlying file” in `std::fs::File`).

5 years agoRollup merge of #56148 - mark-i-m:rustc-guide-submodule, r=nikomatsakis
Guillaume Gomez [Thu, 29 Nov 2018 12:10:36 +0000 (13:10 +0100)]
Rollup merge of #56148 - mark-i-m:rustc-guide-submodule, r=nikomatsakis

Add rustc-guide as a submodule

Adding this as a submodule will allow two things:
- Linking to the guide from doc.rlo
- Doing a link check as part of the rust CI build

Key question: Do we want to wait for the book to be filled out more? e.g. do we ever want to move it out of the nursery?

r? @nikomatsakis

cc @steveklabnik

5 years agoRollup merge of #56127 - rust-lang:oli-obk-patch-1, r=nikomatsakis
Guillaume Gomez [Thu, 29 Nov 2018 12:10:35 +0000 (13:10 +0100)]
Rollup merge of #56127 - rust-lang:oli-obk-patch-1, r=nikomatsakis

Update an outdated comment in mir building

r? @eddyb

5 years agoRollup merge of #56124 - antoine-de:fix_read_to_end_doc_mistake, r=TimNN
Guillaume Gomez [Thu, 29 Nov 2018 12:10:34 +0000 (13:10 +0100)]
Rollup merge of #56124 - antoine-de:fix_read_to_end_doc_mistake, r=TimNN

Fix small doc mistake on std::io::read::read_to_end

The std::io::read main documentation can lead to error because the buffer is prefilled with 10 zeros that will pad the response.
Using an empty vector is better.

The `read_to_end` documentation is already correct though.

This is my first rust PR, don't hesitate to tell me if I did something wrong.

5 years agoRollup merge of #56114 - varkor:nonexhaustive-backticks, r=nikomatsakis
Guillaume Gomez [Thu, 29 Nov 2018 12:10:33 +0000 (13:10 +0100)]
Rollup merge of #56114 - varkor:nonexhaustive-backticks, r=nikomatsakis

Enclose type in backticks for "non-exhaustive patterns" error

This makes the error style consistent with the convention in error messages.

5 years agoRollup merge of #56080 - mark-i-m:patch-2, r=steveklabnik
Guillaume Gomez [Thu, 29 Nov 2018 12:10:31 +0000 (13:10 +0100)]
Rollup merge of #56080 - mark-i-m:patch-2, r=steveklabnik

Reduce the amount of bold text at doc.rlo

Currently, all of the text is either huge or small. IMHO this is hard to read, so I propose that we make the second-level headings smaller, without making them any less prominent.

# Before:

![image](https://user-images.githubusercontent.com/8827840/48737315-50447e80-ec13-11e8-8243-6211dbba1aa1.png)

# After:

![image](https://user-images.githubusercontent.com/8827840/48737258-32771980-ec13-11e8-814e-e7851954c05a.png)

5 years agoRollup merge of #56023 - vorner:doc/atomic-ordering-strip, r=@stjepang
Guillaume Gomez [Thu, 29 Nov 2018 12:10:30 +0000 (13:10 +0100)]
Rollup merge of #56023 - vorner:doc/atomic-ordering-strip, r=@stjepang

atomic::Ordering: Get rid of misleading parts of intro

Remove the parts of atomic::Ordering's intro that wrongly claimed that
SeqCst prevents all reorderings around it.

Closes #55196

This is a (minimal) alternative to #55233.

I also wonder if it would be worth adding at least some warnings that atomics are often a footgun/hard to use correctly, similarly like `mem::transmute` or other functions have.

5 years agoRollup merge of #56021 - RalfJung:track-features, r=oli-obk
Guillaume Gomez [Thu, 29 Nov 2018 12:10:28 +0000 (13:10 +0100)]
Rollup merge of #56021 - RalfJung:track-features, r=oli-obk

avoid features_untracked

The docs say to not use `features_untracked` when we have a tcx.

@oli-obk any particular reason why the untracked version is used all over const qualification?

5 years agoRollup merge of #55391 - matthiaskrgr:bootstrap_cleanup, r=TimNN
Guillaume Gomez [Thu, 29 Nov 2018 12:10:27 +0000 (13:10 +0100)]
Rollup merge of #55391 - matthiaskrgr:bootstrap_cleanup, r=TimNN

bootstrap: clean up a few clippy findings

remove useless format!()s
remove redundant field names in a few struct initializations
pass slice instead of a vector to a function
use is_empty() instead of comparisons to .len()

No functional change intended.

5 years agoAuto merge of #56313 - nikic:update-llvm, r=alexcrichton
bors [Thu, 29 Nov 2018 09:36:19 +0000 (09:36 +0000)]
Auto merge of #56313 - nikic:update-llvm, r=alexcrichton

Update LLVM

In particular this fixes #56265.

r? @alexcrichton

5 years agoAuto merge of #56245 - mark-i-m:stabilize_ques_kleene, r=alexcrichton
bors [Thu, 29 Nov 2018 06:44:12 +0000 (06:44 +0000)]
Auto merge of #56245 - mark-i-m:stabilize_ques_kleene, r=alexcrichton

Stabilize feature `macro_at_most_once_rep`

a.k.a. `?` Kleene operator :tada:

cc #48075

r? @Centril

5 years agoAuto merge of #56329 - eddyb:load-operand-overaligned, r=nikomatsakis
bors [Thu, 29 Nov 2018 02:56:24 +0000 (02:56 +0000)]
Auto merge of #56329 - eddyb:load-operand-overaligned, r=nikomatsakis

rustc_codegen_llvm: don't overalign loads of pair operands.

Counterpart to #56300, but for loads instead of stores.

5 years agoAuto merge of #56300 - nikic:issue-56267, r=eddyb
bors [Thu, 29 Nov 2018 00:06:20 +0000 (00:06 +0000)]
Auto merge of #56300 - nikic:issue-56267, r=eddyb

Fix alignment of stores to scalar pair

The alignment for the second element of a scalar pair is not the same as for the first element, make sure it is calculated correctly. This fixes #56267.

r? @eddyb

5 years agoClean up span in non-trailing `..` suggestion
Esteban Küber [Thu, 29 Nov 2018 00:05:02 +0000 (16:05 -0800)]
Clean up span in non-trailing `..` suggestion

5 years agorustc_codegen_llvm: don't overalign loads of pair operands.
Eduard-Mihai Burtescu [Wed, 28 Nov 2018 22:37:38 +0000 (00:37 +0200)]
rustc_codegen_llvm: don't overalign loads of pair operands.

5 years agoresolve: Fix false-positives from lint `absolute_paths_not_starting_with_crate`
Vadim Petrochenkov [Wed, 28 Nov 2018 19:52:58 +0000 (22:52 +0300)]
resolve: Fix false-positives from lint `absolute_paths_not_starting_with_crate`

5 years agofix futures aliasing mutable and shared ref
Ralf Jung [Wed, 28 Nov 2018 18:29:03 +0000 (19:29 +0100)]
fix futures aliasing mutable and shared ref

5 years agoMove hir::Lit -> ty::Const conversion into its own file
Oliver Scherer [Wed, 28 Nov 2018 16:15:40 +0000 (17:15 +0100)]
Move hir::Lit -> ty::Const conversion into its own file

5 years agorustdoc: add margin-bottom spacing to nested lists
Lyndon Brown [Sat, 24 Nov 2018 23:56:27 +0000 (23:56 +0000)]
rustdoc: add margin-bottom spacing to nested lists

set to zero meant that the nested list was squished up against
subsequent list items/paragraphs

this changes the bottom margin to .6em, same as for paragraphs

an example demonstrating the difference with screenshots is given in the
pull request

5 years agoUpdate LLVM
Nikita Popov [Wed, 28 Nov 2018 14:27:51 +0000 (15:27 +0100)]
Update LLVM

In particular to pull in a fix for #56265.

5 years agoDeduplicate literal -> constant lowering
Oliver Scherer [Wed, 28 Nov 2018 15:07:30 +0000 (16:07 +0100)]
Deduplicate literal -> constant lowering

5 years agofix test
Mark Mansi [Wed, 28 Nov 2018 00:21:10 +0000 (18:21 -0600)]
fix test

5 years agoFix alignment of stores to scalar pair
Nikita Popov [Tue, 27 Nov 2018 23:25:40 +0000 (00:25 +0100)]
Fix alignment of stores to scalar pair

The alignment for the second element of a scalar pair is not the
same as for the first element. Make sure it is computed correctly
based on the element size.

5 years agoAuto merge of #56293 - matthiaskrgr:clippy, r=oli-obk
bors [Tue, 27 Nov 2018 21:54:39 +0000 (21:54 +0000)]
Auto merge of #56293 - matthiaskrgr:clippy, r=oli-obk

submodules: update clippy from 754b4c07 to b2601beb

Changes:
````
Fix NAIVE_BYTECOUNT applicability
Fix dogfood error
Change Applicability of MISTYPED_LITERAL_SUFFIX
Add applicability level to (nearly) every span_lint_and_sugg function
Update stderr file
Fix bugs and improve documentation
Add Applicability::Unspecified to span_lint_and_sugg functions
Introduce snippet_with_applicability and hir_with_applicability functions
readme: tell how to install clippy on travis from git if it is not shipped with a nightly.
constants: add u128 i128 builtin types and fix outdated url
Update lints
Lint only the first statment/expression after alloc
Fix some warnings related to Self
Rename some symbols
Split lint into slow and unsafe vector initalization
Add unsafe set_len initialization
Add slow zero-filled vector initialization lint
Travis: Remove `sudo: false`
Downgrade needless_pass_by_value to allow by default
````

5 years agoFix a typo in the documentation of std::ffi
polyfloyd [Tue, 27 Nov 2018 21:33:46 +0000 (22:33 +0100)]
Fix a typo in the documentation of std::ffi

5 years agosubmodules: update clippy from 754b4c07 to b2601beb
Matthias Krüger [Tue, 27 Nov 2018 20:21:57 +0000 (21:21 +0100)]
submodules: update clippy from 754b4c07 to b2601beb

Changes:
````
Fix NAIVE_BYTECOUNT applicability
Fix dogfood error
Change Applicability of MISTYPED_LITERAL_SUFFIX
Add applicability level to (nearly) every span_lint_and_sugg function
Update stderr file
Fix bugs and improve documentation
Add Applicability::Unspecified to span_lint_and_sugg functions
Introduce snippet_with_applicability and hir_with_applicability functions
readme: tell how to install clippy on travis from git if it is not shipped with a nightly.
constants: add u128 i128 builtin types and fix outdated url
Update lints
Lint only the first statment/expression after alloc
Fix some warnings related to Self
Rename some symbols
Split lint into slow and unsafe vector initalization
Add unsafe set_len initialization
Add slow zero-filled vector initialization lint
Travis: Remove `sudo: false`
Downgrade needless_pass_by_value to allow by default
````

5 years agoRe-enable lldb
Tom Tromey [Tue, 27 Nov 2018 20:06:49 +0000 (13:06 -0700)]
Re-enable lldb

Commit 7215963e56 disabled lldb due to the LLVM update.  This patch
updates lldb to build against the Rust LLVM, and re-enables it.

5 years agofix test
Mark Mansi [Sun, 25 Nov 2018 00:40:03 +0000 (18:40 -0600)]
fix test

5 years agoremove uses of feature gate
Mark Mansi [Sat, 24 Nov 2018 23:26:15 +0000 (17:26 -0600)]
remove uses of feature gate

5 years agoremove unstable book entry
Mark Mansi [Sat, 24 Nov 2018 22:29:43 +0000 (16:29 -0600)]
remove unstable book entry

5 years agoupdate tests
Mark Mansi [Sat, 24 Nov 2018 22:27:13 +0000 (16:27 -0600)]
update tests

5 years agoremove some unused vars
Mark Mansi [Sat, 24 Nov 2018 22:20:25 +0000 (16:20 -0600)]
remove some unused vars

5 years agoremove feature gate
Mark Mansi [Sat, 24 Nov 2018 22:12:16 +0000 (16:12 -0600)]
remove feature gate

5 years agomove feature gate to accepted
Mark Mansi [Sat, 24 Nov 2018 22:09:37 +0000 (16:09 -0600)]
move feature gate to accepted

5 years agoAuto merge of #56264 - petrochenkov:typonly, r=nikomatsakis
bors [Tue, 27 Nov 2018 19:04:44 +0000 (19:04 +0000)]
Auto merge of #56264 - petrochenkov:typonly, r=nikomatsakis

resolve: Extern prelude is for type namespace only

Fixes https://github.com/rust-lang/rust/issues/56263 (stable-to-beta regression)

5 years agoFix small typo in comment
Marius Nuennerich [Tue, 27 Nov 2018 17:57:55 +0000 (18:57 +0100)]
Fix small typo in comment

5 years agoAuto merge of #56251 - scalexm:root-universe, r=nikomatsakis
bors [Tue, 27 Nov 2018 15:54:21 +0000 (15:54 +0000)]
Auto merge of #56251 - scalexm:root-universe, r=nikomatsakis

Put all existential ty vars in the `ROOT` universe

r? @nikomatsakis

5 years agoavoid features_untracked
Ralf Jung [Sat, 17 Nov 2018 12:57:53 +0000 (13:57 +0100)]
avoid features_untracked

5 years agoAuto merge of #55402 - estebank:macro-eof-2, r=nikomatsakis
bors [Tue, 27 Nov 2018 12:31:45 +0000 (12:31 +0000)]
Auto merge of #55402 - estebank:macro-eof-2, r=nikomatsakis

Point at end of macro arm when encountering EOF

Fix #52866.

5 years agoresolve: Extern prelude is for type namespace only
Vadim Petrochenkov [Tue, 27 Nov 2018 00:26:37 +0000 (03:26 +0300)]
resolve: Extern prelude is for type namespace only

5 years agoAuto merge of #56094 - RalfJung:memory-data-revived, r=oli-obk
bors [Tue, 27 Nov 2018 09:30:15 +0000 (09:30 +0000)]
Auto merge of #56094 - RalfJung:memory-data-revived, r=oli-obk

miri: Memory data revived, Hooks for stack frame push/pop

r? @oli-obk

5 years agoAdd missing doc link
Guillaume Gomez [Tue, 27 Nov 2018 08:59:44 +0000 (09:59 +0100)]
Add missing doc link

5 years agoAuto merge of #56262 - petrochenkov:nabsedihyg, r=petrochenkov
bors [Tue, 27 Nov 2018 01:02:37 +0000 (01:02 +0000)]
Auto merge of #56262 - petrochenkov:nabsedihyg, r=petrochenkov

[master] resolve: Implement edition hygiene for imports and absolute paths

Forward-port of https://github.com/rust-lang/rust/pull/56053 to master.

r? @ghost

5 years agotest: Add basic test for VaList
Dan Robertson [Tue, 23 Oct 2018 23:25:58 +0000 (23:25 +0000)]
test: Add basic test for VaList

5 years agolibcore: Add va_list lang item and intrinsics
Dan Robertson [Tue, 23 Oct 2018 23:13:33 +0000 (23:13 +0000)]
libcore: Add va_list lang item and intrinsics

 - Add the llvm intrinsics used to manipulate a va_list.
 - Add the va_list lang item in order to allow implementing
   VaList in libcore.

5 years agoAuto merge of #54668 - RalfJung:use-maybe-uninit, r=SimonSapin
bors [Mon, 26 Nov 2018 22:20:20 +0000 (22:20 +0000)]
Auto merge of #54668 - RalfJung:use-maybe-uninit, r=SimonSapin

Use MaybeUninit in libcore

All code by @japaric. This re-submits the second half of https://github.com/rust-lang/rust/pull/53508 (the first half is at https://github.com/rust-lang/rust/pull/54667). This is likely the one containing the perf regression.

5 years agoSpecify suggestion applicability
Esteban Küber [Mon, 26 Nov 2018 21:58:46 +0000 (13:58 -0800)]
Specify suggestion applicability

5 years agoresolve: Suggest `crate::` for resolving ambiguities when appropriate
Vadim Petrochenkov [Sun, 25 Nov 2018 13:08:43 +0000 (16:08 +0300)]
resolve: Suggest `crate::` for resolving ambiguities when appropriate

More precise spans for ambiguities from macros

5 years agoresolve: Fallback to extern prelude in 2015 imports used from global 2018 edition
Vadim Petrochenkov [Sat, 24 Nov 2018 21:25:03 +0000 (00:25 +0300)]
resolve: Fallback to extern prelude in 2015 imports used from global 2018 edition

5 years agoresolve: Generalize `early_resolve_ident_in_lexical_scope` slightly
Vadim Petrochenkov [Sat, 24 Nov 2018 16:14:05 +0000 (19:14 +0300)]
resolve: Generalize `early_resolve_ident_in_lexical_scope` slightly

Flatten `ModuleOrUniformRoot` variants

5 years agoresolve: Fallback to uniform paths in 2015 imports used from global 2018 edition
Vadim Petrochenkov [Sat, 24 Nov 2018 12:07:03 +0000 (15:07 +0300)]
resolve: Fallback to uniform paths in 2015 imports used from global 2018 edition

5 years agoresolve: Implement edition hygiene for imports and absolute paths
Vadim Petrochenkov [Sun, 18 Nov 2018 00:25:59 +0000 (03:25 +0300)]
resolve: Implement edition hygiene for imports and absolute paths

Use per-span hygiene in a few other places in resolve
Prefer `rust_2015`/`rust_2018` helpers to comparing editions

5 years agoRemove duplicate tests for uniform paths
Vadim Petrochenkov [Thu, 22 Nov 2018 21:50:15 +0000 (00:50 +0300)]
Remove duplicate tests for uniform paths

5 years agorustc-guide has moved
Mark Mansi [Mon, 26 Nov 2018 21:03:13 +0000 (15:03 -0600)]
rustc-guide has moved

5 years agoAdd rustc-guide as a submodule
Mark Mansi [Thu, 22 Nov 2018 00:57:14 +0000 (18:57 -0600)]
Add rustc-guide as a submodule

5 years agoUpdate outdated code comments in StringReader
Jason Langenauer [Mon, 26 Nov 2018 20:21:17 +0000 (21:21 +0100)]
Update outdated code comments in StringReader

5 years agoPut all existential ty vars in the `ROOT` universe
scalexm [Mon, 26 Nov 2018 19:37:43 +0000 (20:37 +0100)]
Put all existential ty vars in the `ROOT` universe

5 years agoEmit one diagnostic for multiple misplaced lifetimes
Esteban Küber [Mon, 26 Nov 2018 16:32:47 +0000 (08:32 -0800)]
Emit one diagnostic for multiple misplaced lifetimes

5 years agoRemove unsafe `unsafe` inner function.
Corey Farwell [Mon, 26 Nov 2018 13:40:34 +0000 (08:40 -0500)]
Remove unsafe `unsafe` inner function.

Within this `Iterator` implementation, a function `unsafe_get` is
defined which unsafely allows _unchecked_ indexing of any element in a
slice. This should be marked as _unsafe_, but it is not.

To address this issue, I removed that inner function.

5 years agoAuto merge of #55835 - alexcrichton:llvm-upgrade, r=nikomatsakis
bors [Mon, 26 Nov 2018 12:14:13 +0000 (12:14 +0000)]
Auto merge of #55835 - alexcrichton:llvm-upgrade, r=nikomatsakis

Upgrade LLVM to trunk, still version 8

This commit upgrades the LLVM/LLD/compiler-rt submodules used to the current trunk versions in upstream. Some activity has happened on the wasm SIMD side of things as well as LLD which we'd like to pick up!

5 years agoAuto merge of #56070 - oli-obk:const_let, r=eddyb
bors [Mon, 26 Nov 2018 08:17:36 +0000 (08:17 +0000)]
Auto merge of #56070 - oli-obk:const_let, r=eddyb

Allow assignments in const contexts

fixes https://github.com/rust-lang/rust/issues/54098
fixes https://github.com/rust-lang/rust/issues/51251
fixes https://github.com/rust-lang/rust/issues/52613

5 years agoTemporarily disable LLDB
Alex Crichton [Mon, 26 Nov 2018 04:28:26 +0000 (20:28 -0800)]
Temporarily disable LLDB

5 years agoPass `--export-dynamic` to LLD for wasm
Alex Crichton [Sat, 10 Nov 2018 18:04:17 +0000 (10:04 -0800)]
Pass `--export-dynamic` to LLD for wasm

This should handle recent symbol visibility changes happening, although
we'll likely want to tweak this in the future!

5 years agowasm: Pass `--no-demangle` to LLD
Alex Crichton [Fri, 9 Nov 2018 21:51:00 +0000 (13:51 -0800)]
wasm: Pass `--no-demangle` to LLD

Our mangling scheme is not C++'s, so tell LLD to not demangle anything
so we can handle Rust-specific demangling ourselves.

5 years agoConditionally compile in only the extra argument.
Edd Barrett [Wed, 7 Nov 2018 12:34:43 +0000 (12:34 +0000)]
Conditionally compile in only the extra argument.