rust/src/librustc/middle
Daniel Micay f62c753b8f add back noalias to &mut T pointer parameters
This was removed because these could alias with `&const T` or `@mut T`
and those are now gone from the language. There are still aliasing
issues within local scopes, but this is correct for function parameters.

This also removes the no-op `noalias` marker on proc (not a pointer) and
leaves out the mention of #6750 because real type-based alias analysis
is not within the scope of best effort usage of the `noalias` attribute.

Test case:

    pub fn foo(x: &mut &mut u32) {
        **x = 5;
        **x = 5;
    }

Before:

    define void @_ZN3foo20h0ce94c9671b0150bdaa4v0.0E(i32** nocapture readonly) unnamed_addr #0 {
    entry-block:
      %1 = load i32** %0, align 8
      store i32 5, i32* %1, align 4
      %2 = load i32** %0, align 8
      store i32 5, i32* %2, align 4
      ret void
    }

After:

    define void @_ZN3foo20h0ce94c9671b0150bdaa4v0.0E(i32** noalias nocapture readonly) unnamed_addr #0 {
    entry-block:
      %1 = load i32** %0, align 8
      store i32 5, i32* %1, align 4
      ret void
    }

Closes #12436
2014-05-04 12:41:14 -04:00
..
borrowck Pre-step towards issue #12624 and others: Introduce ExprUseVisitor, remove the 2014-04-24 19:59:49 -04:00
cfg syntax: remove obsolete mutability from ExprVec and ExprRepeat. 2014-04-04 13:23:03 -07:00
trans add back noalias to &mut T pointer parameters 2014-05-04 12:41:14 -04:00
typeck auto merge of #13898 : nikomatsakis/rust/type-bounds-b, r=acrichto 2014-05-04 03:41:50 -07:00
astencode.rs Pre-step towards issue #12624 and others: Introduce ExprUseVisitor, remove the 2014-04-24 19:59:49 -04:00
check_const.rs rustc: de-@ some RefCell's. 2014-04-22 19:06:43 +03:00
check_loop.rs rustc: move the check_loop pass earlier. 2014-04-05 10:52:28 +11:00
check_match.rs auto merge of #13724 : nikomatsakis/rust/expr-use-visitor, r=pnkfelix 2014-05-01 04:36:50 -07:00
check_static.rs Replace all ~"" with "".to_owned() 2014-04-18 17:25:34 -07:00
const_eval.rs Add lint check for negating uint literals and variables. 2014-05-03 00:13:26 +02:00
dataflow.rs Replace most ~exprs with 'box'. #11779 2014-05-02 23:00:58 -07:00
dead.rs Replace most ~exprs with 'box'. #11779 2014-05-02 23:00:58 -07:00
effect.rs Remove internal support for fixed length strings 2014-04-29 13:10:23 +12:00
entry.rs std: Remove RefCell::set() 2014-04-03 20:28:59 -07:00
expr_use_visitor.rs Address nits from @pnkfelix 2014-04-30 20:22:36 -04:00
freevars.rs Pre-step towards issue #12624 and others: Introduce ExprUseVisitor, remove the 2014-04-24 19:59:49 -04:00
graph.rs auto merge of #13237 : alexcrichton/rust/private-tuple-structs, r=brson 2014-04-03 18:41:45 -07:00
kind.rs Pre-step towards issue #12624 and others: Introduce ExprUseVisitor, remove the 2014-04-24 19:59:49 -04:00
lang_items.rs librustc: Implement the Box<T> type syntax. RFC #14. Issue #13885. 2014-05-02 18:27:50 -07:00
lint.rs auto merge of #13579 : hirschenberger/rust/lint_unsigned_negate, r=alexcrichton 2014-05-02 16:51:50 -07:00
liveness.rs auto merge of #13724 : nikomatsakis/rust/expr-use-visitor, r=pnkfelix 2014-05-01 04:36:50 -07:00
mem_categorization.rs auto merge of #13724 : nikomatsakis/rust/expr-use-visitor, r=pnkfelix 2014-05-01 04:36:50 -07:00
pat_util.rs rustc: de-@ some RefCell's. 2014-04-22 19:06:43 +03:00
privacy.rs syntax: ViewItemUse no longer contains multiple view paths. 2014-04-26 22:33:45 +09:00
reachable.rs rustc: Crawl static initializers for reachability 2014-05-02 15:40:07 -07:00
region.rs Fix misspellings in comments. 2014-04-21 00:49:39 -04:00
resolve_lifetime.rs Support unsized types with the type keyword 2014-04-23 12:30:58 +12:00
resolve.rs auto merge of #13898 : nikomatsakis/rust/type-bounds-b, r=acrichto 2014-05-04 03:41:50 -07:00
subst.rs Fix misspellings in comments. 2014-04-21 00:49:39 -04:00
ty_fold.rs Replace most ~exprs with 'box'. #11779 2014-05-02 23:00:58 -07:00
ty.rs Replace most ~exprs with 'box'. #11779 2014-05-02 23:00:58 -07:00