move nice-region-error reporting into its own module

This commit is contained in:
Niko Matsakis 2017-12-12 07:52:25 -05:00
parent e28d03f38b
commit 4089d140e0
5 changed files with 16 additions and 5 deletions

View file

@ -78,10 +78,7 @@ mod note;
mod need_type_info;
mod named_anon_conflict;
#[macro_use]
mod util;
mod different_lifetimes;
mod nice_region_error;
impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
pub fn note_and_explain_region(self,

View file

@ -18,7 +18,7 @@ use infer::lexical_region_resolve::RegionResolutionError;
use hir::map as hir_map;
use middle::resolve_lifetime as rl;
use hir::intravisit::{self, Visitor, NestedVisitorMap};
use infer::error_reporting::util::AnonymousArgInfo;
use infer::error_reporting::nice_region_error::util::AnonymousArgInfo;
impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
/// Print the error message for lifetime errors when both the concerned regions are anonymous.

View file

@ -0,0 +1,14 @@
// Copyright 2012-2013 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.
#[macro_use] mod util;
mod different_lifetimes;
mod named_anon_conflict;