<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/src/test/compile-fail/lint-unconditional-recursion.rs, branch 1.6.0</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.6.0</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.6.0'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2015-08-03T22:17:56+00:00</updated>
<entry>
<title>rustc_lint: handle more method calls in unconditional_recursion.</title>
<updated>2015-08-03T22:17:56+00:00</updated>
<author>
<name>Eduard Burtescu</name>
<email>edy.burt@gmail.com</email>
</author>
<published>2015-08-03T22:17:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=585f0e928b0e88e6da8d7203ef5d077147569ce0'/>
<id>urn:sha1:585f0e928b0e88e6da8d7203ef5d077147569ce0</id>
<content type='text'>
</content>
</entry>
<entry>
<title>lint: default methods must be called on Self to unconditionally recur.</title>
<updated>2015-06-29T23:00:54+00:00</updated>
<author>
<name>Huon Wilson</name>
<email>dbau.pp+github@gmail.com</email>
</author>
<published>2015-06-29T22:56:00+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=900af2c6d9b21ca1b1db35b7b09b0fb59cf78b84'/>
<id>urn:sha1:900af2c6d9b21ca1b1db35b7b09b0fb59cf78b84</id>
<content type='text'>
This catches the case when a trait defines a default method that calls
itself, but on a type that isn't necessarily `Self`, e.g. there's no
reason that `T = Self` in the following, so the call isn't necessarily
recursive (`T` may override the call).

    trait Bar {
        fn method&lt;T: Bar&gt;(&amp;self, x: &amp;T) {
            x.method(x)
        }
    }

Fixes #26333.
</content>
</entry>
<entry>
<title>lint: only consider actual calls as unconditional recursion.</title>
<updated>2015-06-29T22:59:37+00:00</updated>
<author>
<name>Huon Wilson</name>
<email>dbau.pp+github@gmail.com</email>
</author>
<published>2015-06-29T21:51:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=b1931e48a01b418b4b1ba6c747f2c99a5b10d96f'/>
<id>urn:sha1:b1931e48a01b418b4b1ba6c747f2c99a5b10d96f</id>
<content type='text'>
Specifically, just mentioning the function name as a value is fine, as
long as it isn't called, e.g. `fn main() { let _ = main; }`.

Closes #21705.
</content>
</entry>
<entry>
<title>Add a lint to detect unconditional recursion.</title>
<updated>2015-01-24T13:21:03+00:00</updated>
<author>
<name>Huon Wilson</name>
<email>dbau.pp+github@gmail.com</email>
</author>
<published>2014-12-31T16:06:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=fbef241709093b3fb18cb12500fd33e4ab964b62'/>
<id>urn:sha1:fbef241709093b3fb18cb12500fd33e4ab964b62</id>
<content type='text'>
E.g. `fn foo() { foo() }`, or, more subtlely

    impl Foo for Box&lt;Foo+'static&gt; {
        fn bar(&amp;self) {
            self.bar();
        }
    }

The compiler will warn and point out the points where recursion occurs,
if it determines that the function cannot return without calling itself.

Closes #17899.
</content>
</entry>
</feed>
