]> git.lizzy.rs Git - rust.git/log
rust.git
5 years agoRollup merge of #54921 - GuillaumeGomez:line-numbers, r=QuietMisdreavus
kennytm [Fri, 26 Oct 2018 10:24:57 +0000 (18:24 +0800)]
Rollup merge of #54921 - GuillaumeGomez:line-numbers, r=QuietMisdreavus

Add line numbers option to rustdoc

Fixes #22878.

r? @QuietMisdreavus

5 years agoRollup merge of #54824 - Munksgaard:fix-49713, r=QuietMisdreavus
kennytm [Fri, 26 Oct 2018 10:24:55 +0000 (18:24 +0800)]
Rollup merge of #54824 - Munksgaard:fix-49713, r=QuietMisdreavus

Cleanup rustdoc tests with `@!has` and `@!matches`

Fixes #49713

Here's a _long_ list of all the places that include `@!has`. I have marked the ones I have looked at so far.

 - [x] search-index.rs:        fn priv_method() {} // @!has - priv_method
 - [x] search-index.rs:        fn trait_method(&self) {} // @!has - priv_method
 - [x] search-index.rs:    // @!has search-index.js Target
 - [x] short-dockblock.rs:// @!has foo/index.html '//*[@class="docblock-short"]/p/h1' 'fooo'
 - [x] short-dockblock.rs:// @!has foo/index.html '//*[@class="docblock-short"]/p/h2' 'mooood'
 - [x] keyword.rs:// @!has foo/index.html '//a/@href' 'foo/index.html'
 - [x] keyword.rs:// @!has foo/foo/index.html
 - [x] keyword.rs:// @!has-dir foo/foo
 - [x] issue-46380-2.rs:// @!has - '//*[@class="impl"]' 'impl PublicTrait<PrivateStruct> for PublicStruct'
 - [x] escape-rust-expr.rs:// @!has escape_rust_expr/constant.CONST_S.html '//pre[@class="rust const"]' '"<script>"'
 - [x] issue-33069.rs:// @!has - '//code' 'impl Bar for Foo'
 - [x] playground-empty.rs:// @!has foo/index.html '//a[@class="test-arrow"]' "Run"
 - [x] issue-34473.rs:// @!has - SomeTypeWithLongName
 - [x] issue-34473.rs:// @!has - SomeTypeWithLongName
 - [x] issue-34473.rs:// @!has foo/struct.SomeTypeWithLongName.html
 - [x] issue-29584.rs:// @!has - 'impl Bar for'
 - [x] hidden-line.rs:// @!has hidden_line/fn.foo.html invisible
 - [x] manual_impl.rs:// @!has - '//*[@class="docblock"]' 'Docs associated with the trait a_method definition.'
 - [x] manual_impl.rs:// @!has - '//*[@class="docblock"]' 'There is another line'
 - [x] manual_impl.rs:// @!has - '//*[@class="docblock"]' 'Docs associated with the trait a_method definition.'
 - [x] manual_impl.rs:// @!has - '//*[@class="docblock"]' 'Docs associated with the trait c_method definition.'
 - [x] issue-19190-2.rs:// @!has - '//*[@id="method.new"]' 'fn new() -> String'
 - [x] unneeded-trait-implementations-title.rs:// @!has foo/struct.Bar.html '//*[@id="implementations"]'
 - [x] masked.rs:// @!has 'search-index.js' 'masked_method'
 - [x] masked.rs:// @!has 'foo/struct.String.html' 'MaskedTrait'
 - [x] masked.rs:// @!has 'foo/struct.String.html' 'masked_method'
 - [x] masked.rs:// @!has 'foo/trait.Clone.html' 'MaskedStruct'
 - [x] masked.rs:// @!has 'foo/struct.MyStruct.html' 'MaskedTrait'
 - [x] masked.rs:// @!has 'foo/struct.MyStruct.html' 'masked_method'
 - [x] masked.rs:// @!has 'foo/trait.MyTrait.html' 'MaskedStruct'
 - [x] redirect.rs:// @!has - '//code/a' 'Qux'
 - [x] issue-43701.rs:// @!has implementors/core/clone/trait.Clone.js
 - [x] union.rs:    // @!has - //pre "b: u16"
 - [x] prim-title.rs:// @!has - '//head/title' 'foo'
 - [x] empty-section.rs:// @!has - '//*[@class="synthetic-implementations"]' 'Auto Trait Implementations'
 - [x] traits-in-bodies-private.rs:// @!has - '//code' 'impl HiddenTrait for SomeStruct'
 - [x] playground-none.rs:// @!has foo/index.html '//a[@class="test-arrow"]' "Run"
 - [x] issue-34025.rs:// @!has 'foo/sys/index.html'
 - [x] issue-34025.rs:// @!has 'foo/sys/sidebar-items.js'
 - [x] issue-34025.rs:        // @!has 'foo/sys/fn.foo.html'
 - [x] issue-23812.rs:// @!has - '/// Outer comment'
 - [x] issue-23812.rs:// @!has - '//! Inner comment'
 - [x] issue-23812.rs:// @!has - '/** Outer block comment */'
 - [x] issue-23812.rs:// @!has - '/*! Inner block comment */'
 - [x] pub-use-extern-macros.rs:// @!has pub_use_extern_macros/index.html '//code' 'pub use macros::bar;'
 - [x] pub-use-extern-macros.rs:// @!has pub_use_extern_macros/index.html '//code' 'pub use macros::baz;'
 - [x] pub-use-extern-macros.rs:// @!has pub_use_extern_macros/macro.quux.html
 - [x] pub-use-extern-macros.rs:// @!has pub_use_extern_macros/index.html '//code' 'pub use macros::quux;'
 - [x] issue-26606.rs:// @!has - '//a/@href' '../src/'
 - [x] foreigntype-reexport.rs:// @!has foreigntype_reexport/foreigntype.X4.html
 - [x] foreigntype-reexport.rs:// @!has foreigntype_reexport/index.html '//a[@class="foreigntype"]' 'X4'
 - [x] issue-31899.rs:// @!has - 'rust rust-example-rendered'
 - [x] issue-31899.rs:// @!has - 'use ndarray::arr2'
 - [x] issue-31899.rs:// @!has - 'prohibited'
 - [x] hidden-trait-struct-impls.rs:// @!has foo/struct.Bar.html '//*[@id="impl-Foo"]' 'impl Foo for Bar'
 - [x] hidden-trait-struct-impls.rs:// @!has foo/struct.Bar.html '//*[@id="impl-Dark"]' 'impl Dark for Bar'
 - [x] hidden-trait-struct-impls.rs:// @!has foo/trait.Bam.html '//*[@id="implementors-list"]' 'impl Bam for Hidden'
 - [x] hidden-impls.rs:// @!has - 'Foo'
 - [x] hidden-impls.rs:// @!has - 'Foo'
 - [x] module-impls.rs:// @!has foo/index.html 'Implementations'
 - [x] issue-35169.rs:// @!has - '//*[@id="by_mut_ref.v"]' 'fn by_mut_ref(&mut self)'
 - [x] issue-35169.rs:// @!has - '//*[@id="method.by_mut_ref"]' 'fn by_mut_ref(&mut self)'
 - [x] issue-35169.rs:// @!has - '//*[@id="by_explicit_mut_ref.v"]' 'fn by_explicit_mut_ref(self: &mut Foo)'
 - [x] issue-35169.rs:// @!has - '//*[@id="method.by_explicit_mut_ref"]' 'fn by_explicit_mut_ref(self: &mut Foo)'
 - [x] issue-35169.rs:// @!has - '//*[@id="by_explicit_box.v"]' 'fn by_explicit_box(self: Box<Foo>)'
 - [x] issue-35169.rs:// @!has - '//*[@id="method.by_explicit_box"]' 'fn by_explicit_box(self: Box<Foo>)'
 - [x] issue-35169.rs:// @!has - '//*[@id="by_explicit_self_box.v"]' 'fn by_explicit_self_box(self: Box<Self>)'
 - [x] issue-35169.rs:// @!has - '//*[@id="method.by_explicit_self_box"]' 'fn by_explicit_self_box(self: Box<Self>)'
 - [x] issue-35169.rs:// @!has - '//*[@id="static_foo.v"]' 'fn static_foo()'
 - [x] issue-35169.rs:// @!has - '//*[@id="method.static_foo"]' 'fn static_foo()'
 - [x] extern-links.rs:// @!has foo/index.html '//a' 'extern_links'
 - [x] extern-links.rs:// @!has foo/index.html '//a' 'Foo'
 - [x] extern-links.rs:    // @!has foo/hidden/extern_links/index.html
 - [x] extern-links.rs:    // @!has foo/hidden/extern_links/struct.Foo.html
 - [x] issue-33178-1.rs:// @!has - //a/@title empty
 - [x] issue-33178-1.rs:// @!has - //a/@title variant_struct
 - [x] issue-47038.rs:// @!has - '//*[@id="macros"]' 'Macros'
 - [x] issue-47038.rs:// @!has - '//a/@href' 'macro.vec.html'
 - [x] issue-47038.rs:// @!has 'foo/macro.vec.html'
 - [x] issue-46766.rs:// @!has foo/index.html '//a/@href' './Enum/index.html'
 - [x] issue-32395.rs:// @!has - 'pub qux'
 - [x] issue-32395.rs:// @!has - 'pub Bar'
 - [x] issue-32395.rs:// @!has - 'pub qux'
 - [x] issue-32395.rs:// @!has - 'pub Bar'
 - [x] hidden-methods.rs:// @!has - 'Methods'
 - [x] hidden-methods.rs:// @!has - 'impl Foo'
 - [x] hidden-methods.rs:// @!has - 'this_should_be_hidden'
 - [x] hidden-methods.rs:// @!has - 'Methods'
 - [x] hidden-methods.rs:// @!has - 'impl Bar'
 - [x] hidden-methods.rs:// @!has - 'this_should_be_hidden'
 - [x] structfields.rs:    // @!has - //pre "b: ()"
 - [x] structfields.rs:    // @!has - //pre "c: usize"
 - [x] structfields.rs:    // @!has - //pre "// some fields omitted"
 - [x] structfields.rs:        // @!has - //pre "b: ()"
 - [x] issue-46767.rs:// @!has foo/index.html '//a/@href' './private/index.html'
 - [x] assoc-consts.rs:    // @!has - FOO_HIDDEN
 - [x] assoc-consts.rs:    // @!has - FOO_HIDDEN
 - [x] assoc-consts.rs:    // @!has assoc_consts/struct.Bar.html 'BAR_PRIVATE'
 - [x] assoc-consts.rs:    // @!has assoc_consts/struct.Bar.html 'BAR_HIDDEN'
 - [x] issue-53689.rs:// @!has - 'MyStruct'
 - [x] search-index-summaries.rs:// @!has - 'www.example.com'
 - [x] search-index-summaries.rs:// @!has - 'More Foo.'
 - [x] impl-everywhere.rs:// @!has foo/fn.foo.html '//section[@id="main"]//pre' "x: &\'x impl Foo"
 - [x] impl-everywhere.rs:// @!has foo/fn.foo.html '//section[@id="main"]//pre' "-> &\'x impl Foo {"
 - [x] impl-everywhere.rs:// @!has foo/fn.foo2.html '//section[@id="main"]//pre' "x: &\'x impl Foo"
 - [x] impl-everywhere.rs:// @!has foo/fn.foo2.html '//section[@id="main"]//pre' '-> impl Foo2 {'
 - [x] impl-everywhere.rs:// @!has foo/fn.foo_foo.html '//section[@id="main"]//pre' '-> impl Foo + Foo2 {'
 - [x] impl-everywhere.rs:// @!has foo/fn.foo2.html '//section[@id="main"]//pre' "x: &'x (impl Foo + Foo2)"
 - [x] issue-19190.rs:// @!has - '//*[@id="static_foo.v"]' 'fn static_foo()'
 - [x] issue-19190.rs:// @!has - '//*[@id="method.static_foo"]' 'fn static_foo()'
 - [x] deprecated-impls.rs:    // @!has - 'fn_def_def_with_doc full'
 - [x] deprecated-impls.rs:    // @!has - 'fn_empty_with_doc full'
 - [x] deprecated-impls.rs:    // @!has - 'fn_def_with full'
 - [x] deprecated-impls.rs:    // @!has - 'fn_def_def_with_doc full'
 - [x] issue-19190-3.rs:// @!has - '//*[@id="method.new"]' 'fn new() -> String'
 - [x] issue-19190-3.rs:// @!has - '//*[@id="method.static_baz"]' 'fn static_baz()'
 - [x] issue-19190-3.rs:// @!has - '//*[@id="method.static_baz"]' 'fn static_baz()'
 - [x] sidebar-items.rs:// @!has - '//*[@class="sidebar-links"]/a' 'waza'
 - [x] sidebar-items.rs:// @!has - '//*[@class="sidebar-links"]/a' 'waza'
 - [x] issue-27104.rs:// @!has - 'extern crate std'
 - [x] issue-27104.rs:// @!has - 'use std::prelude::'
 - [x] issue-13698.rs:// @!has issue_13698/struct.Foo.html '//*[@id="method.foo"]' 'fn foo'
 - [x] issue-13698.rs:// @!has issue_13698/struct.Foo.html '//*[@id="method.foo"]' 'fn bar'
 - [x] issue-41783.rs:// @!has - 'space'
 - [x] issue-41783.rs:// @!has - 'comment'
 - [x] trait-self-link.rs:// @!has trait_self_link/trait.Foo.html //a/@href ../trait_self_link/trait.Foo.html
 - [x] generic-impl.rs:// @!has foo/struct.Bar.html '//h3[@id="impl-ToString"]//code' 'impl<T> ToString for T'
 - [x] all.rs:// @!has foo/all.html 'private_module'
 - [x] issue-35169-2.rs:// @!has - '//*[@id="by_explicit_box.v"]' 'fn by_explicit_box(self: Box<Foo>)'
 - [x] issue-35169-2.rs:// @!has - '//*[@id="method.by_explicit_box"]' 'fn by_explicit_box(self: Box<Foo>)'
 - [x] issue-35169-2.rs:// @!has - '//*[@id="by_explicit_self_box.v"]' 'fn by_explicit_self_box(self: Box<Self>)'
 - [x] issue-35169-2.rs:// @!has - '//*[@id="method.by_explicit_self_box"]' 'fn by_explicit_self_box(self: Box<Self>)'
 - [x] issue-35169-2.rs:// @!has - '//*[@id="static_foo.v"]' 'fn static_foo()'
 - [x] issue-35169-2.rs:// @!has - '//*[@id="method.static_foo"]' 'fn static_foo()'
 - [x] doc-cfg.rs:// @!has - '//*[@id="main"]/*[@class="stability"]/*[@class="stab portability"]' ''
 - [x] inline_local/glob-private.rs:// @!has - "mod1"
 - [x] inline_local/glob-private.rs:// @!has - "Mod1Private"
 - [x] inline_local/glob-private.rs:// @!has - "mod2"
 - [x] inline_local/glob-private.rs:// @!has - "Mod2Private"
 - [x] inline_local/glob-private.rs:// @!has foo/struct.Mod1Private.html
 - [x] inline_local/glob-private.rs:// @!has foo/struct.Mod2Private.html
 - [x] inline_local/glob-private.rs:// @!has foo/mod1/index.html
 - [x] inline_local/glob-private.rs:// @!has foo/mod1/struct.Mod1Private.html
 - [x] inline_local/glob-private.rs:// @!has foo/mod1/struct.Mod2Public.html
 - [x] inline_local/glob-private.rs:// @!has foo/mod1/struct.Mod2Private.html
 - [x] inline_local/glob-private.rs:// @!has foo/mod1/mod2/index.html
 - [x] inline_local/glob-private.rs:// @!has foo/mod1/mod2/struct.Mod2Private.html
 - [x] inline_local/glob-private.rs:// @!has-dir foo/mod2
 - [x] inline_local/glob-private.rs:// @!has foo/mod2/index.html
 - [x] inline_local/glob-private.rs:// @!has foo/mod2/struct.Mod2Public.html
 - [x] inline_local/glob-private.rs:// @!has foo/mod2/struct.Mod2Private.html
 - [x] inline_local/hidden-use.rs:// @!has - 'private'
 - [x] inline_local/hidden-use.rs:// @!has - 'Foo'
 - [x] inline_local/hidden-use.rs:// @!has hidden_use/struct.Foo.html
 - [x] inline_local/glob-extern-no-defaults.rs:// @!has - "private_fn"
 - [x] inline_local/glob-extern-no-defaults.rs:// @!has foo/fn.private_fn.html
 - [x] inline_local/issue-32343.rs:// @!has issue_32343/struct.Foo.html
 - [x] inline_local/issue-32343.rs:// @!has - '//code/a' 'Foo'
 - [x] inline_local/issue-32343.rs:// @!has issue_32343/struct.Bar.html
 - [x] inline_local/glob-private-no-defaults.rs:// @!has - "Mod1Private"
 - [x] inline_local/glob-private-no-defaults.rs:// @!has - "mod2"
 - [x] inline_local/glob-private-no-defaults.rs:// @!has - "Mod2Private"
 - [x] inline_local/glob-private-no-defaults.rs:// @!has foo/struct.Mod1Private.html
 - [x] inline_local/glob-private-no-defaults.rs:// @!has foo/struct.Mod2Private.html
 - [x] inline_local/glob-private-no-defaults.rs:// @!has - "Mod2Public"
 - [x] inline_local/glob-private-no-defaults.rs:// @!has - "Mod2Private"
 - [x] inline_local/glob-private-no-defaults.rs:// @!has foo/mod1/struct.Mod2Public.html
 - [x] inline_local/glob-private-no-defaults.rs:// @!has foo/mod1/struct.Mod2Private.html
 - [x] inline_local/glob-private-no-defaults.rs:// @!has foo/mod2/index.html
 - [x] inline_local/glob-private-no-defaults.rs:// @!has foo/mod2/struct.Mod2Public.html
 - [x] inline_local/glob-private-no-defaults.rs:// @!has foo/mod2/struct.Mod2Private.html
 - [x] inline_local/glob-extern.rs:// @!has - "mod1"
 - [x] inline_local/glob-extern.rs:// @!has - "private_fn"
 - [x] inline_local/glob-extern.rs:// @!has foo/fn.private_fn.html
 - [x] inline_local/glob-extern.rs:// @!has foo/mod1/index.html
 - [x] inline_local/glob-extern.rs:// @!has foo/mod1/fn.private_fn.html
 - [x] inline_local/please_inline.rs:    // @!has - 'pub use foo::'
 - [x] inline_local/please_inline.rs:    // @!has please_inline/b/struct.Foo.html
 - [x] inline_cross/hidden-use.rs:// @!has - 'rustdoc_hidden'
 - [x] inline_cross/hidden-use.rs:// @!has - 'Bar'
 - [x] inline_cross/hidden-use.rs:// @!has hidden_use/struct.Bar.html
 - [x] inline_cross/inline_hidden.rs:// @!has - '//a/@title' 'Foo'
 - [x] inline_cross/assoc-items.rs:// @!has - 'PrivateConst'
 - [x] inline_cross/assoc-items.rs:// @!has - 'private_method'
 - [x] inline_cross/cross-glob.rs:// @!has cross_glob/index.html '//code' 'pub use inner::*;'
 - [x] inline_cross/macro-vis.rs:// @!has - '//pre' 'some_macro'
 - [x] inline_cross/macro-vis.rs:// @!has macro_vis/macro.other_macro.html
 - [x] inline_cross/macro-vis.rs:// @!has macro_vis/index.html '//a/@href' 'macro.other_macro.html'
 - [x] inline_cross/macro-vis.rs:// @!has - '//code' 'pub use qwop::other_macro;'
 - [x] inline_cross/macro-vis.rs:// @!has macro_vis/macro.super_macro.html
 - [x] inline_cross/issue-31948.rs:// @!has - '//*[@class="impl"]//code' 'Bar for'
 - [x] inline_cross/issue-31948.rs:// @!has - '//*[@class="impl"]//code' 'Qux for'
 - [x] inline_cross/issue-31948.rs:// @!has - '//code' 'for Wibble'
 - [x] inline_cross/issue-31948.rs:// @!has - '//code' 'for Wobble'
 - [x] inline_cross/issue-31948.rs:// @!has - '//code' 'for Wibble'
 - [x] inline_cross/issue-31948.rs:// @!has - '//code' 'for Wobble'
 - [x] inline_cross/issue-31948.rs:// @!has issue_31948/trait.Bar.html
 - [x] inline_cross/issue-31948.rs:// @!has issue_31948/trait.Qux.html
 - [x] inline_cross/issue-31948.rs:// @!has issue_31948/struct.Wibble.html
 - [x] inline_cross/issue-31948.rs:// @!has issue_31948/struct.Wobble.html
 - [x] inline_cross/issue-31948-1.rs:// @!has - '//*[@class="impl"]//code' 'Bar for'
 - [x] inline_cross/issue-31948-1.rs:// @!has - '//*[@class="impl"]//code' 'Qux for'
 - [x] inline_cross/issue-31948-1.rs:// @!has - '//code' 'for Wibble'
 - [x] inline_cross/issue-31948-1.rs:// @!has - '//code' 'for Wibble'
 - [x] inline_cross/issue-31948-1.rs:// @!has issue_31948_1/trait.Bar.html
 - [x] inline_cross/issue-31948-1.rs:// @!has issue_31948_1/trait.Qux.html
 - [x] inline_cross/issue-28480.rs:// @!has -  '//a/@title' 'Hidden'
 - [x] inline_cross/issue-28480.rs:// @!has -  '//a/@title' 'Hidden'
 - [x] inline_cross/issue-31948-2.rs:// @!has - '//*[@class="impl"]//code' 'Bar for'
 - [x] inline_cross/issue-31948-2.rs:// @!has issue_31948_2/trait.Bar.html
 - [x] inline_cross/issue-31948-2.rs:// @!has issue_31948_2/trait.Woof.html
 - [x] inline_cross/issue-31948-2.rs:// @!has issue_31948_2/trait.Bark.html

It doesn't look like `@!matches` is used anywhere.

5 years agoRollup merge of #54816 - oli-obk:double_promotion, r=alexreg
kennytm [Fri, 26 Oct 2018 10:24:54 +0000 (18:24 +0800)]
Rollup merge of #54816 - oli-obk:double_promotion, r=alexreg

Don't try to promote already promoted out temporaries

fixes #53201

r? @eddyb

5 years agoAuto merge of #55362 - ehuss:releases-cargo-new-edition, r=Mark-Simulacrum
bors [Fri, 26 Oct 2018 02:58:28 +0000 (02:58 +0000)]
Auto merge of #55362 - ehuss:releases-cargo-new-edition, r=Mark-Simulacrum

Remove `cargo new --edition` from release notes.

This was removed at the last minute (#55315, https://github.com/rust-lang/cargo/pull/6216).
Apologies for not catching this.

5 years agoAuto merge of #54145 - nrc:save-path-segments, r=petrochenkov
bors [Fri, 26 Oct 2018 00:04:29 +0000 (00:04 +0000)]
Auto merge of #54145 - nrc:save-path-segments, r=petrochenkov

Keep resolved defs in path prefixes and emit them in save-analysis

Closes https://github.com/nrc/rls-analysis/issues/109

r? @eddyb or @petrochenkov

5 years agoRemove `cargo new --edition` from release notes.
Eric Huss [Thu, 25 Oct 2018 20:57:56 +0000 (13:57 -0700)]
Remove `cargo new --edition` from release notes.

5 years agomore reviewer changes
Nick Cameron [Thu, 25 Oct 2018 02:23:45 +0000 (15:23 +1300)]
more reviewer changes

5 years agoFix tests and assertions; add some comments
Nick Cameron [Thu, 11 Oct 2018 08:15:18 +0000 (21:15 +1300)]
Fix tests and assertions; add some comments

5 years agorebasing and reviewer changes
Nick Cameron [Wed, 12 Sep 2018 03:21:50 +0000 (15:21 +1200)]
rebasing and reviewer changes

Primarily refactoring `(Ident, Option<NodeId>)` to `Segment`

5 years agosave-analysis: handle missing field names
Nick Cameron [Wed, 12 Sep 2018 02:05:08 +0000 (14:05 +1200)]
save-analysis: handle missing field names

FIxes https://github.com/rust-lang-nursery/rls/issues/1031

5 years agoFix tests and rustdoc
Nick Cameron [Wed, 12 Sep 2018 01:44:22 +0000 (13:44 +1200)]
Fix tests and rustdoc

5 years agodump refs for path segments in save-analysis
Nick Cameron [Tue, 11 Sep 2018 03:08:47 +0000 (15:08 +1200)]
dump refs for path segments in save-analysis

Requires adding path segments to the hir map

5 years agodump data for prefix path segments
Nick Cameron [Mon, 10 Sep 2018 03:26:47 +0000 (15:26 +1200)]
dump data for prefix path segments

5 years agosave-analysis: remove hacky, unnecessary code now that we have spans for every ident
Nick Cameron [Mon, 10 Sep 2018 00:54:36 +0000 (12:54 +1200)]
save-analysis: remove hacky, unnecessary code now that we have spans for every ident

5 years agoStore a resolved def on hir::PathSegment
Nick Cameron [Thu, 6 Sep 2018 07:24:33 +0000 (19:24 +1200)]
Store a resolved def on hir::PathSegment

5 years agoGive each PathSegment a NodeId
Nick Cameron [Fri, 31 Aug 2018 00:01:26 +0000 (12:01 +1200)]
Give each PathSegment a NodeId

5 years agoAuto merge of #54490 - wesleywiser:rewrite_it_in_mir, r=oli-obk
bors [Thu, 25 Oct 2018 20:40:31 +0000 (20:40 +0000)]
Auto merge of #54490 - wesleywiser:rewrite_it_in_mir, r=oli-obk

Rewrite the `UnconditionalRecursion` lint to use MIR

Part of #51002

r? @eddyb

5 years agoClear up nonpromotable const fn call qualification
Oliver Scherer [Thu, 25 Oct 2018 19:18:22 +0000 (21:18 +0200)]
Clear up nonpromotable const fn call qualification

5 years agoGrammar nit
Oliver Scherer [Thu, 25 Oct 2018 19:14:25 +0000 (21:14 +0200)]
Grammar nit

5 years agoClarify exclusion comment further
Oliver Scherer [Thu, 25 Oct 2018 17:39:01 +0000 (19:39 +0200)]
Clarify exclusion comment further

5 years agoExplain why we can encounter a `Goto` terminator that we want to promote
Oliver Scherer [Thu, 25 Oct 2018 17:37:07 +0000 (19:37 +0200)]
Explain why we can encounter a `Goto` terminator that we want to promote

5 years agoExplain a comment in more detail
Oliver S̶c̶h̶n̶e̶i̶d̶e̶r Scherer [Thu, 25 Oct 2018 16:28:14 +0000 (18:28 +0200)]
Explain a comment in more detail

5 years agoAuto merge of #55347 - pietroalbini:rollup, r=pietroalbini
bors [Thu, 25 Oct 2018 14:40:22 +0000 (14:40 +0000)]
Auto merge of #55347 - pietroalbini:rollup, r=pietroalbini

Rollup of 22 pull requests

Successful merges:

 - #53507 (Add doc for impl From for Waker)
 - #53931 (Gradually expanding libstd's keyword documentation)
 - #54965 (update tcp stream documentation)
 - #54977 (Accept `Option<Box<$t:ty>>` in macro argument)
 - #55138 (in which unused-parens suggestions heed what the user actually wrote)
 - #55173 (Suggest appropriate syntax on missing lifetime specifier in return type)
 - #55200 (Documents `From` implementations for `Stdio`)
 - #55245 (submodules: update clippy from 5afdf8b7 to b1d03437)
 - #55247 (Clarified code example in char primitive doc)
 - #55251 (Fix a typo in the documentation of RangeInclusive)
 - #55253 (only issue "variant of the expected type" suggestion for enums)
 - #55254 (Correct trailing ellipsis in name_from_pat)
 - #55269 (fix typos in various places)
 - #55282 (Remove redundant clone)
 - #55285 (Do some copy editing on the release notes)
 - #55291 (Update stdsimd submodule)
 - #55296 (Set RUST_BACKTRACE=0 for rustdoc-ui/failed-doctest-output.rs)
 - #55306 (Regression test for #54478.)
 - #55328 (Fix doc for new copysign functions)
 - #55340 (Operands no longer appear in places)
 - #55345 (Remove is_null)
 - #55348 (Update RELEASES.md after destabilization of non_modrs_mods)

Failed merges:

r? @ghost

5 years agoRollup merge of #55348 - pietroalbini:backport-stable-notes, r=pietroalbini
Pietro Albini [Thu, 25 Oct 2018 14:00:39 +0000 (16:00 +0200)]
Rollup merge of #55348 - pietroalbini:backport-stable-notes, r=pietroalbini

Backports the release notes update from stable to master.

r? @ghost

5 years agoUpdate RELEASES.md after destabilization of non_modrs_mods
Pietro Albini [Wed, 24 Oct 2018 13:28:34 +0000 (15:28 +0200)]
Update RELEASES.md after destabilization of non_modrs_mods

5 years agoRollup merge of #55345 - RalfJung:no-null, r=oli-obk
Pietro Albini [Thu, 25 Oct 2018 12:31:24 +0000 (14:31 +0200)]
Rollup merge of #55345 - RalfJung:no-null, r=oli-obk

Remove is_null

It was confusingly named (`is_zero` would have been better, as someone pointed out somewhere but I forgot who or where), and it didn't even reliably test for "is this value 0 at run-time" because out-of-bounds pointers *can* be 0.

It's not used in rustc, and miri only really needs `is_null_ptr` and `to_bytes() == 0`, so let's just kill this method.

r? @oli-obk

5 years agoRollup merge of #55340 - RalfJung:operand-docs, r=oli-obk
Pietro Albini [Thu, 25 Oct 2018 12:31:22 +0000 (14:31 +0200)]
Rollup merge of #55340 - RalfJung:operand-docs, r=oli-obk

Operands no longer appear in places

Fix an outdated comment.

5 years agoRollup merge of #55328 - raphlinus:copysign_typo, r=joshtriplett
Pietro Albini [Thu, 25 Oct 2018 12:31:21 +0000 (14:31 +0200)]
Rollup merge of #55328 - raphlinus:copysign_typo, r=joshtriplett

Fix doc for new copysign functions

Thanks to @LukasKalbertodt for catching this. Addresses a comment raised in #55169 after it was merged.

5 years agoRollup merge of #55306 - pnkfelix:issue-54478-regression-test-jemalloc-ctl, r=nikomat...
Pietro Albini [Thu, 25 Oct 2018 12:31:20 +0000 (14:31 +0200)]
Rollup merge of #55306 - pnkfelix:issue-54478-regression-test-jemalloc-ctl, r=nikomatsakis

Regression test for #54478.

This is a regression test for #54478.

I confirmed that it fails on:
rustdoc 1.30.0-beta.12 (96a229824 2018-10-04)
and passes on:
rustdoc 1.31.0-nightly (f99911a4a 2018-10-23)

Fix #54478

5 years agoRollup merge of #55296 - cuviper:rustdoc-ui-backtrace, r=nikomatsakis
Pietro Albini [Thu, 25 Oct 2018 12:31:18 +0000 (14:31 +0200)]
Rollup merge of #55296 - cuviper:rustdoc-ui-backtrace, r=nikomatsakis

Set RUST_BACKTRACE=0 for rustdoc-ui/failed-doctest-output.rs

This UI test is sensitive to backtrace output, so it should make sure
that backtraces are not enabled by the environment.

5 years agoRollup merge of #55291 - kazcw:master, r=nikomatsakis
Pietro Albini [Thu, 25 Oct 2018 12:31:17 +0000 (14:31 +0200)]
Rollup merge of #55291 - kazcw:master, r=nikomatsakis

Update stdsimd submodule

Fixes a SSE2 bug. (#55249)

5 years agoRollup merge of #55285 - integer32llc:release-notes-improvements, r=Aaronepower
Pietro Albini [Thu, 25 Oct 2018 12:31:16 +0000 (14:31 +0200)]
Rollup merge of #55285 - integer32llc:release-notes-improvements, r=Aaronepower

Do some copy editing on the release notes

I was reading through the release notes to find something and noticed
some small grammatical and consistency issues.

I'm happy to revert any of these changes if folks disagree with them!

5 years agoRollup merge of #55282 - sinkuu:redundant_clone, r=estebank
Pietro Albini [Thu, 25 Oct 2018 12:31:14 +0000 (14:31 +0200)]
Rollup merge of #55282 - sinkuu:redundant_clone, r=estebank

Remove redundant clone

5 years agoRollup merge of #55269 - matthiaskrgr:typos_oct, r=zackmdavis
Pietro Albini [Thu, 25 Oct 2018 12:31:13 +0000 (14:31 +0200)]
Rollup merge of #55269 - matthiaskrgr:typos_oct, r=zackmdavis

fix typos in various places

5 years agoRollup merge of #55254 - rust-lang:clean-two-dots, r=GuillaumeGomez
Pietro Albini [Thu, 25 Oct 2018 12:31:12 +0000 (14:31 +0200)]
Rollup merge of #55254 - rust-lang:clean-two-dots, r=GuillaumeGomez

Correct trailing ellipsis in name_from_pat

r? @GuillaumeGomez

5 years agoRollup merge of #55253 - zackmdavis:some_suggestion, r=pnkfelix
Pietro Albini [Thu, 25 Oct 2018 12:31:10 +0000 (14:31 +0200)]
Rollup merge of #55253 - zackmdavis:some_suggestion, r=pnkfelix

only issue "variant of the expected type" suggestion for enums

This suggestion (introduced in pull-request #43178 / eac74104) was being issued for one-field-struct expected types (in which case it is misleading and outright wrong), even though it was only intended for one-field enum-variants (most notably, `Some`).

Add a conditional to adhere to the original intent. (It would be possible to generalize to structs, but not obviously net desirable.) This adds a level of indentation, so the diff here is going to be
easier to read in [ignore-whitespace mode](https://github.com/rust-lang/rust/commit/b0d3d3b9?w=1).

Resolves #55250.

r? @pnkfelix

5 years agoRollup merge of #55251 - NieDzejkob:master, r=TimNN
Pietro Albini [Thu, 25 Oct 2018 12:31:08 +0000 (14:31 +0200)]
Rollup merge of #55251 - NieDzejkob:master, r=TimNN

Fix a typo in the documentation of RangeInclusive

5 years agoRollup merge of #55247 - peterjoel:peterjoel-prim-char-doc-example, r=joshtriplett
Pietro Albini [Thu, 25 Oct 2018 12:31:07 +0000 (14:31 +0200)]
Rollup merge of #55247 - peterjoel:peterjoel-prim-char-doc-example, r=joshtriplett

Clarified code example in char primitive doc

The example was not as clear as it could be because it was making an assumption about the structure of the data in order to multiply the number of elements in the slice by the item size. This change demonstrates the idea more straightforwardly, without needing a calculation, by just comparing the size of the slices.

5 years agoRollup merge of #55245 - matthiaskrgr:clippy, r=nikomatsakis
Pietro Albini [Thu, 25 Oct 2018 12:31:05 +0000 (14:31 +0200)]
Rollup merge of #55245 - matthiaskrgr:clippy, r=nikomatsakis

submodules: update clippy from 5afdf8b7 to b1d03437

Just a routine update.

Changes:
````
new_ret_no_self: add sample from #3313 to Known Problems section.
Support multiline comments and hopefully fix panic
Check for comments in collapsible ifs
Resolve ICE in needless range loop lint
RIIR update_lints: Update changelog links
Rename if_let_redundant_pattern_matching to redundant_pattern_matching
Add lint for redundant pattern matching for explicit return boolean
Fix issue #3322: reword help message for len_zero
Simplify manual_memcpy suggestion in some cases
Fix dogfood
Update known problems for unnecessary_fold
RIIR update_lints: Replace lint count in README.md
Rename `active_lints` to `usable_lints`
Add comment on WalkDir vs. fs::read_dir
sort_by -> sort_by_key
Some more documentation for clippy_dev
Use `WalkDir` to also gather from subdirectories
Avoid linting `boxed_local` on trait implementations.
Website: Make lint categories linkable
Restore clippy_dummy's placeholder name
Swap order of methods in `needless_range_loop` suggestion in some cases
Revert "Exclude pattern guards from unnecessary_fold lint"
Exclude pattern guards from unnecessary_fold lint
````

5 years agoRollup merge of #55200 - octronics:gh51430, r=kennytm
Pietro Albini [Thu, 25 Oct 2018 12:31:04 +0000 (14:31 +0200)]
Rollup merge of #55200 - octronics:gh51430, r=kennytm

Documents `From` implementations for `Stdio`

This PR solves part of #51430 by adding a basic summary and an example to each `impl From` inside `process` module (`ChildStdin`, `ChildStdout`, `ChildStderr`, `File`).

It does not document if the conversions allocate memory and how expensive they are.

5 years agoRollup merge of #55173 - estebank:suggest-static, r=oli-obk
Pietro Albini [Thu, 25 Oct 2018 12:31:03 +0000 (14:31 +0200)]
Rollup merge of #55173 - estebank:suggest-static, r=oli-obk

Suggest appropriate syntax on missing lifetime specifier in return type

Suggest using `'static` when a lifetime is missing in the return type
with a structured suggestion instead of a note.

Fix #55170.

5 years agoRollup merge of #55138 - zackmdavis:the_paren_trap, r=pnkfelix
Pietro Albini [Thu, 25 Oct 2018 12:31:01 +0000 (14:31 +0200)]
Rollup merge of #55138 - zackmdavis:the_paren_trap, r=pnkfelix

in which unused-parens suggestions heed what the user actually wrote

Aaron Hill pointed out that unnecessary parens around a macro call (paradigmatically, `format!`) yielded a suggestion of hideous macro-expanded code. `span_to_snippet` is fallable as far as the type system is concerned, so the pretty-printing can live on in the oft-neglected `else` branch.

Resolves #55109.

5 years agoRollup merge of #54977 - estebank:macro-arg-parse, r=pnkfelix
Pietro Albini [Thu, 25 Oct 2018 12:31:00 +0000 (14:31 +0200)]
Rollup merge of #54977 - estebank:macro-arg-parse, r=pnkfelix

Accept `Option<Box<$t:ty>>` in macro argument

Given the following code, compile successfuly:

```
macro_rules! test {
    (
        fn fun() -> Option<Box<$t:ty>>;
    ) => {
        fn fun(x: $t) -> Option<Box<$t>>
        { Some(Box::new(x)) }
    }
}

test! {
    fn fun() -> Option<Box<i32>>;
}
```

Fix #25274.

5 years agoRollup merge of #54965 - chathaway-codes:update-tcp-stream-docs, r=GuillaumeGomez
Pietro Albini [Thu, 25 Oct 2018 12:30:59 +0000 (14:30 +0200)]
Rollup merge of #54965 - chathaway-codes:update-tcp-stream-docs, r=GuillaumeGomez

update tcp stream documentation

A small styling issue that seemed inconsistent here when compared to other places (such as https://doc.rust-lang.org/beta/std/net/struct.TcpListener.html).

5 years agoRollup merge of #53931 - iirelu:keyword-docs, r=steveklabnik
Pietro Albini [Thu, 25 Oct 2018 12:30:58 +0000 (14:30 +0200)]
Rollup merge of #53931 - iirelu:keyword-docs, r=steveklabnik

Gradually expanding libstd's keyword documentation

I'm working on adding new keywords to the documentation and refreshing the incomplete older ones, and I'm hoping that I can eventually add all the standalone-usable keywords after a bunch of incremental work. It would be cool to see the keywords section of std's docs be a definitive reference as to what each keyword means when you see it, and that's what I'm aiming towards with this work.

I'm far from a Rust expert so there will inevitably be things to fix in this, also I'm not sure if this should be a bunch of quickly-merged PRs or one gradually-updated PR that gets merged once it's done.

5 years agoRollup merge of #53507 - phungleson:fix-impl-from-for-waker, r=cramertj
Pietro Albini [Thu, 25 Oct 2018 12:30:56 +0000 (14:30 +0200)]
Rollup merge of #53507 - phungleson:fix-impl-from-for-waker, r=cramertj

Add doc for impl From for Waker

As part of issue #51430 (cc @skade).

The impl is very simple, so not sure if we need to go into any details.

5 years agoAuto merge of #55323 - nikomatsakis:nll-ICE-55219-and-55241, r=pnkfelix
bors [Thu, 25 Oct 2018 12:00:50 +0000 (12:00 +0000)]
Auto merge of #55323 - nikomatsakis:nll-ICE-55219-and-55241, r=pnkfelix

introduce type-op for user-type ascription in NLL

Handle user-type ascription in a type operator, which gives us a lot more flexibility around the order in which we resolve things.

r? @pnkfelix

Fixes #55219
Fixes #55241

5 years agoRemove is_null
Ralf Jung [Thu, 25 Oct 2018 09:39:54 +0000 (11:39 +0200)]
Remove is_null

It was confusingly named (`is_zero` would have been better), and it didn't even
reliably test for "is this value 0 at run-time" because out-of-bounds pointers
*can* be 0.

5 years agoAuto merge of #54658 - petrochenkov:experelude, r=nikomatsakis
bors [Thu, 25 Oct 2018 09:18:17 +0000 (09:18 +0000)]
Auto merge of #54658 - petrochenkov:experelude, r=nikomatsakis

Add `extern crate` items to extern prelude

With this patch each `extern crate orig_name as name` item adds name `name` into the extern prelude, as if it was passed with `--extern`.

What changes this causes in practice?
Almost none! After all, `--extern` passed from Cargo was supposed to replace `extern crate` items in source, so if some code has `extern crate` item (or had it on 2015 edition), then it most likely uses `--extern` as well...

... with exception of a few important cases.

- Crates using `proc_macro`. `proc_macro` is not passed with `--extern` right now and is therefore not in extern prelude.
Together with 2018 edition import behavior this causes problems like https://github.com/rust-lang/rust/issues/54418, e.g.
    ```rust
    extern crate proc_macro;
    use proc_macro::TokenStream;
    ```
    doesn't work.
It starts working after this patch.

- `#[no_std]` crates using `std` conditionally, like @aturon described in https://github.com/rust-lang/rust/issues/53166#issuecomment-425219286, and still wanting to write `std` instead of `crate::std`. This PR covers that case as well.
This allows us to revert placing `std` into the extern prelude unconditionally, which was, I think, a [bad idea](https://github.com/rust-lang/rust/issues/53166#issuecomment-425117829).

- Later `extern crate` syntax can be extended to support adding an alias to some local path to extern prelude, as it may be required for resolving https://github.com/rust-lang/rust/issues/54647.

Notes:
- Only `extern crate` items from the root module added to the prelude, mostly because this behavior for items from inner modules would look very strange, rather than for technical reasons.
This means you can opt out from the prelude additions with something like
    ```rust
    mod inner {
        pub(crate) extern crate foo;
    }
    use inner::foo;
    ```
- I haven't updated logic for 2018 import canaries to work fully correctly with this. The cases where it matters are pretty exotic (the `extern crate` item must be "sufficiently macro expanded") and I'd rather spend the time on eliminating the canaries entirely.

5 years agoOperands no longer appear in places
Ralf Jung [Thu, 25 Oct 2018 06:58:12 +0000 (08:58 +0200)]
Operands no longer appear in places

5 years agoFix doc for new copysign functions
Raph Levien [Wed, 24 Oct 2018 22:19:23 +0000 (15:19 -0700)]
Fix doc for new copysign functions

Thanks to @LukasKalbertodt for catching this. Addresses a comment
raised in #55169 after it was merged.

5 years agoDocuments `From` implementations for `Stdio`
OCTronics [Fri, 19 Oct 2018 10:00:45 +0000 (12:00 +0200)]
Documents `From` implementations for `Stdio`

Add a basic summary and an example to From `ChildStdin`, `ChildStdout`,
`ChildStderr`, `File` implementations.

5 years agoport the relate-types code from NLL type-check into a type-op
Niko Matsakis [Wed, 24 Oct 2018 16:08:34 +0000 (12:08 -0400)]
port the relate-types code from NLL type-check into a type-op

Add regression tests for #55219 and #55241

Also another test where a duplicate-like error appears to have been
suppressed; I'm not 100% sure why this output changes, though I could
imagine that some duplicate suppression is enabled by this PR.

5 years agointroduce (but do not use) `ascribe_user_type` goal
Niko Matsakis [Wed, 24 Oct 2018 00:31:57 +0000 (20:31 -0400)]
introduce (but do not use) `ascribe_user_type` goal

Lots of annoying boilerplate.

5 years agoThis is a regression test for #54478.
Felix S. Klock II [Wed, 24 Oct 2018 10:19:47 +0000 (12:19 +0200)]
This is a regression test for #54478.

I confirmed that it fails on:
rustdoc 1.30.0-beta.12 (96a229824 2018-10-04)
and passes on:
rustdoc 1.31.0-nightly (f99911a4a 2018-10-23)

5 years agoSet RUST_BACKTRACE=0 for rustdoc-ui/failed-doctest-output.rs
Josh Stone [Tue, 23 Oct 2018 22:38:31 +0000 (15:38 -0700)]
Set RUST_BACKTRACE=0 for rustdoc-ui/failed-doctest-output.rs

This UI test is sensitive to backtrace output, so it should make sure
that backtraces are not enabled by the environment.

5 years agoProhibit macro-expanded `extern crate` items shadowing crates passed with `--extern`
Vadim Petrochenkov [Tue, 23 Oct 2018 22:03:47 +0000 (01:03 +0300)]
Prohibit macro-expanded `extern crate` items shadowing crates passed with `--extern`

5 years agoUpdate comment based on suggestion.
Son [Tue, 23 Oct 2018 22:28:04 +0000 (09:28 +1100)]
Update comment based on suggestion.

5 years agoMinor doc improvements
Vadim Petrochenkov [Mon, 22 Oct 2018 19:54:18 +0000 (22:54 +0300)]
Minor doc improvements

5 years agoFeature gate extern prelude additions from `extern crate` items
Vadim Petrochenkov [Sat, 20 Oct 2018 17:26:24 +0000 (20:26 +0300)]
Feature gate extern prelude additions from `extern crate` items

Fix rustdoc and fulldeps tests

5 years agoAdd `extern crate` items to extern prelude
Vadim Petrochenkov [Fri, 28 Sep 2018 22:31:54 +0000 (01:31 +0300)]
Add `extern crate` items to extern prelude

5 years agoHopefully fix compile error
iirelu [Tue, 23 Oct 2018 20:27:02 +0000 (22:27 +0200)]
Hopefully fix compile error

This was added in the fortnight this PR spent stale. I'm hoping this
one-liner fixes it.

5 years agoAuto merge of #55229 - nikomatsakis:issue-54692-closure-signatures, r=MatthewJasper
bors [Tue, 23 Oct 2018 17:44:19 +0000 (17:44 +0000)]
Auto merge of #55229 - nikomatsakis:issue-54692-closure-signatures, r=MatthewJasper

enforce user annotations in closure signatures

Not *quite* ready yet but I'm opening anyway. Still have to finish running tests locally.

Fixes #54692
Fixes #54124

r? @matthewjasper

5 years agoUpdate stdsimd submodule
Kaz Wesley [Tue, 23 Oct 2018 16:39:33 +0000 (09:39 -0700)]
Update stdsimd submodule

Fixes a SSE2 bug.

5 years agotype_check/mod.rs: rustfmt
Niko Matsakis [Tue, 23 Oct 2018 14:57:06 +0000 (10:57 -0400)]
type_check/mod.rs: rustfmt

5 years agocheck the self type is well-formed
Niko Matsakis [Tue, 23 Oct 2018 14:30:41 +0000 (10:30 -0400)]
check the self type is well-formed

This fixes `issue-28848.rs` -- it also handles another case that the
AST region checker gets wrong (`wf-self-type.rs`).  I don't actually
think that this is the *right way* to be enforcing this constraint --
I think we should probably do it more generally, perhaps by editing
`predicates_of` for the impl itself. The chalk-style implied bounds
setup ought to fix this.

5 years agofix typos in various places
Matthias Krüger [Mon, 22 Oct 2018 16:21:55 +0000 (18:21 +0200)]
fix typos in various places

5 years agoDo some copy editing on the release notes
Carol (Nichols || Goulding) [Tue, 23 Oct 2018 11:53:48 +0000 (07:53 -0400)]
Do some copy editing on the release notes

I was reading through the release notes to find something and noticed
some small grammatical and consistency issues.

5 years agoAuto merge of #55281 - alexcrichton:revert-demote, r=petrochenkov
bors [Tue, 23 Oct 2018 10:56:41 +0000 (10:56 +0000)]
Auto merge of #55281 - alexcrichton:revert-demote, r=petrochenkov

Revert "rustc: Fix (again) simd vectors by-val in ABI"

This reverts commit 3cc8f738d4247a9b475d8e074b621e602ac2b7be.

5 years agoAuto merge of #55113 - mockersf:master, r=estebank
bors [Tue, 23 Oct 2018 08:17:18 +0000 (08:17 +0000)]
Auto merge of #55113 - mockersf:master, r=estebank

#45829 when a renamed import conflict with a previous import

Fix the suggestion when a renamed import conflict.

It check if the snipped contains `" as "`, and if so uses everything before for the suggestion.

5 years agoRemove redundant clone
Shotaro Yamada [Tue, 23 Oct 2018 08:13:59 +0000 (17:13 +0900)]
Remove redundant clone

5 years agoRevert "rustc: Fix (again) simd vectors by-val in ABI"
Alex Crichton [Tue, 23 Oct 2018 07:59:14 +0000 (00:59 -0700)]
Revert "rustc: Fix (again) simd vectors by-val in ABI"

This reverts commit 3cc8f738d4247a9b475d8e074b621e602ac2b7be.

5 years agoAuto merge of #54778 - scottmcm:stabilize-ihle, r=pnkfelix
bors [Tue, 23 Oct 2018 04:05:50 +0000 (04:05 +0000)]
Auto merge of #54778 - scottmcm:stabilize-ihle, r=pnkfelix

Stabilize impl_header_lifetime_elision in 2015

~~This is currently blocked on https://github.com/rust-lang/rust/issues/54902; it should be good after that~~

It's already stable in 2018; this finishes the stabilization.

FCP completed (https://github.com/rust-lang/rust/issues/15872#issuecomment-417953153), proposal (https://github.com/rust-lang/rust/issues/15872#issuecomment-412759783).

Tracking issue: https://github.com/rust-lang/rust/issues/15872
Usage examples (from libcore): https://github.com/rust-lang/rust/pull/54687

5 years agoAuto merge of #55231 - zackmdavis:determinate, r=oli-obk
bors [Tue, 23 Oct 2018 01:24:26 +0000 (01:24 +0000)]
Auto merge of #55231 - zackmdavis:determinate, r=oli-obk

pick a reference issue for absolute-paths future incompatibility info

It would be kind of embarrassing to ship with the "issue TBD" message!

5 years ago[review comments] modify test and clean up code
Oliver S̶c̶h̶n̶e̶i̶d̶e̶r Scherer [Fri, 19 Oct 2018 17:43:43 +0000 (10:43 -0700)]
[review comments] modify test and clean up code

Co-Authored-By: estebank <esteban@kuber.com.ar>
5 years agoreview comments
Esteban Küber [Thu, 18 Oct 2018 20:05:38 +0000 (13:05 -0700)]
review comments

5 years agoSuggest appropriate syntax on missing lifetime specifier in return type
Esteban Küber [Thu, 18 Oct 2018 04:07:31 +0000 (21:07 -0700)]
Suggest appropriate syntax on missing lifetime specifier in return type

Suggest using `'static` when a lifetime is missing in the return type
with a structured suggestion instead of a note.

5 years agostop reporting "unsatisfied lifetime bounds" errors after the first
Niko Matsakis [Mon, 22 Oct 2018 15:20:17 +0000 (11:20 -0400)]
stop reporting "unsatisfied lifetime bounds" errors after the first

In particular, after the first for a given region variable. This
suppresses a lot of duplicate errors.

5 years agoflesh out closure-substs test
Niko Matsakis [Mon, 22 Oct 2018 13:19:33 +0000 (09:19 -0400)]
flesh out closure-substs test

5 years agofix incremental test
Niko Matsakis [Sat, 20 Oct 2018 22:26:27 +0000 (18:26 -0400)]
fix incremental test

5 years agoadd regression test for #54124
Niko Matsakis [Sat, 20 Oct 2018 19:00:57 +0000 (15:00 -0400)]
add regression test for #54124

Fixes #54124

5 years agostart enforcing closure types
Niko Matsakis [Sat, 20 Oct 2018 12:38:16 +0000 (08:38 -0400)]
start enforcing closure types

5 years agorecord supplied sig of closure
Niko Matsakis [Fri, 19 Oct 2018 21:24:24 +0000 (17:24 -0400)]
record supplied sig of closure

5 years agoconvert user-provided signatures into def-id
Niko Matsakis [Fri, 19 Oct 2018 21:19:29 +0000 (17:19 -0400)]
convert user-provided signatures into def-id

5 years agoadd a table to track user-provided signatures
Niko Matsakis [Fri, 19 Oct 2018 10:25:12 +0000 (06:25 -0400)]
add a table to track user-provided signatures

5 years agobetter dummy span detection and remove redundant branch
François Mockers [Mon, 22 Oct 2018 07:08:09 +0000 (09:08 +0200)]
better dummy span detection and remove redundant branch

5 years agoAuto merge of #55224 - kryptan:master, r=matthewjasper
bors [Mon, 22 Oct 2018 03:41:28 +0000 (03:41 +0000)]
Auto merge of #55224 - kryptan:master, r=matthewjasper

Use a keyword in raw identifier example

That's a very small documentation fix. The text says "you can now use keywords as identifiers" but example didn't use a keyword and would work without raw identifiers.

5 years agoAuto merge of #55126 - GuillaumeGomez:improve-search-tabs, r=QuietMisdreavus
bors [Mon, 22 Oct 2018 01:04:52 +0000 (01:04 +0000)]
Auto merge of #55126 - GuillaumeGomez:improve-search-tabs, r=QuietMisdreavus

improve search tabs look

Fixes #55056.

![screenshot from 2018-10-16 19-06-48](https://user-images.githubusercontent.com/3050060/47034247-1e08b280-d177-11e8-9c1e-c7320af9b561.png)

![screenshot from 2018-10-16 19-09-39](https://user-images.githubusercontent.com/3050060/47034255-2365fd00-d177-11e8-8686-4765d3e56ff5.png)

With this, I think it'll be more obvious.

cc @memoryruins

r? @QuietMisdreavus

5 years agoCorrect trailing ellipsis in name_from_pat
varkor [Sun, 21 Oct 2018 23:31:07 +0000 (00:31 +0100)]
Correct trailing ellipsis in name_from_pat

5 years agoonly issue "variant of the expected type" suggestion for enums
Zack M. Davis [Sun, 21 Oct 2018 22:37:01 +0000 (15:37 -0700)]
only issue "variant of the expected type" suggestion for enums

Felix S. Klock II pointed out that this suggestion (introduced in
pull-request #43178 / eac74104) was being issued for one-field-struct
expected types (in which case it is misleading and outright wrong),
even though it was only intended for one-field enum-variants (most
notably, `Some`). Particularly tender-hearted code-historians may be
inclined to show mercy towards the author of #43178 on the grounds
that it's somewhat confusing that struct field definitions are given
in a type called `ty::VariantDef`.

Add a conditional to adhere to the original intent. (It would be
possible to generalize to structs, but not obviously net desirable.)
This adds a level of indentation, so the diff here is going to be
easier to read in ignore-whitespace mode (`-w`).

Resolves #55250.

5 years agoFix a typo in the documentation of RangeInclusive
Jakub Kądziołka [Sun, 21 Oct 2018 21:42:19 +0000 (23:42 +0200)]
Fix a typo in the documentation of RangeInclusive

5 years agoAuto merge of #55179 - bjorn3:miri_public_op_field, r=RalfJung
bors [Sun, 21 Oct 2018 20:07:34 +0000 (20:07 +0000)]
Auto merge of #55179 - bjorn3:miri_public_op_field, r=RalfJung

Give OpTy access to locals for priroda

r? @oli-obk

5 years agoClarified code example
Peter Hall [Sun, 21 Oct 2018 17:53:09 +0000 (18:53 +0100)]
Clarified code example

The example was not as clear as it could be because it was making an assumption about the structure of the data in order to multiply the number of collection elements by the item size. This change demonstrates the idea more straightforwardly, without the calculation.

5 years agoAuto merge of #55236 - petrochenkov:pfail, r=davidtwco
bors [Sun, 21 Oct 2018 17:26:16 +0000 (17:26 +0000)]
Auto merge of #55236 - petrochenkov:pfail, r=davidtwco

Move parse-fail tests to UI

cc https://github.com/rust-lang/rust/issues/53353

r? @davidtwco

5 years agoimprove search tabs look
Guillaume Gomez [Tue, 16 Oct 2018 17:07:41 +0000 (19:07 +0200)]
improve search tabs look

5 years agosubmodules: update clippy from 5afdf8b7 to b1d03437
Matthias Krüger [Sun, 21 Oct 2018 15:53:12 +0000 (17:53 +0200)]
submodules: update clippy from 5afdf8b7 to b1d03437

Changes:
````
new_ret_no_self: add sample from #3313 to Known Problems section.
Support multiline comments and hopefully fix panic
Check for comments in collapsible ifs
Resolve ICE in needless range loop lint
RIIR update_lints: Update changelog links
Rename if_let_redundant_pattern_matching to redundant_pattern_matching
Add lint for redundant pattern matching for explicit return boolean
Fix issue #3322: reword help message for len_zero
Simplify manual_memcpy suggestion in some cases
Fix dogfood
Update known problems for unnecessary_fold
RIIR update_lints: Replace lint count in README.md
Rename `active_lints` to `usable_lints`
Add comment on WalkDir vs. fs::read_dir
sort_by -> sort_by_key
Some more documentation for clippy_dev
Use `WalkDir` to also gather from subdirectories
Avoid linting `boxed_local` on trait implementations.
Website: Make lint categories linkable
Restore clippy_dummy's placeholder name
Swap order of methods in `needless_range_loop` suggestion in some cases
Revert "Exclude pattern guards from unnecessary_fold lint"
Exclude pattern guards from unnecessary_fold lint
````

5 years agoAuto merge of #52984 - fabric-and-ink:remove-canonical-var, r=scalexm
bors [Sun, 21 Oct 2018 14:42:35 +0000 (14:42 +0000)]
Auto merge of #52984 - fabric-and-ink:remove-canonical-var, r=scalexm

Replace CanonicalVar with DebruijnIndex

Close #49887

5 years agoAddress review comments
bjorn3 [Sun, 21 Oct 2018 14:16:23 +0000 (16:16 +0200)]
Address review comments

5 years agoRename read_local_of_frame to access_local
bjorn3 [Sat, 20 Oct 2018 12:39:23 +0000 (14:39 +0200)]
Rename read_local_of_frame to access_local

5 years agoRename alloc_map_ref to alloc_map
bjorn3 [Sat, 20 Oct 2018 11:42:25 +0000 (13:42 +0200)]
Rename alloc_map_ref to alloc_map