]> git.lizzy.rs Git - rust.git/commitdiff
found the stack overflow culprit
authorachernyak <artemchernyak@gmail.com>
Sat, 29 Apr 2017 03:42:05 +0000 (22:42 -0500)
committerachernyak <artemchernyak@gmail.com>
Sat, 29 Apr 2017 03:42:05 +0000 (22:42 -0500)
src/librustc/ty/maps.rs

index 51fc0aa895ce5054fb4cdeaab624729217e71247..c39417b67d40b826ed9f593add7051a8e70eede5 100644 (file)
@@ -346,8 +346,8 @@ fn try_get_with<F, R>(tcx: TyCtxt<'a, $tcx, 'lcx>,
                 }
 
                 // FIXME(eddyb) Get more valid Span's on queries.
-                if span == DUMMY_SP {
-                    span = key.default_span(tcx);
+                if span == DUMMY_SP && stringify!($name) != "def_span" {
+                    span = key.default_span(tcx)
                 }
 
                 let _task = tcx.dep_graph.in_task(Self::to_dep_node(&key));