c209d44c34
Refactor `FnCtxt::autoderef` to use an external iterator and to not register any obligation from the main autoderef loop, but rather to register them after (and if) the loop successfully completes. Fixes #24819 Fixes #25801 Fixes #27631 Fixes #31258 Fixes #31964 Fixes #32320 Fixes #33515 Fixes #33755
23 lines
632 B
Rust
23 lines
632 B
Rust
// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
|
|
// file at the top-level directory of this distribution and at
|
|
// http://rust-lang.org/COPYRIGHT.
|
|
//
|
|
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
|
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
|
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
|
// option. This file may not be copied, modified, or distributed
|
|
// except according to those terms.
|
|
|
|
#![recursion_limit="2"]
|
|
struct Foo;
|
|
|
|
impl Foo {
|
|
fn foo(&self) {}
|
|
}
|
|
|
|
fn main() {
|
|
let foo = Foo;
|
|
let ref_foo = &&Foo;
|
|
ref_foo.foo(); //~ ERROR E0055
|
|
}
|