]> git.lizzy.rs Git - rust.git/blobdiff - src/libproc_macro/bridge/server.rs
libproc_macro => 2018
[rust.git] / src / libproc_macro / bridge / server.rs
index f500b17d1caf316f01105fff1d59d2d9cb96bf07..75806eb9d17602edbae8da9143391ba067d81897 100644 (file)
@@ -1,13 +1,3 @@
-// Copyright 2018 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.
-
 //! Server-side traits.
 
 use super::*;
@@ -16,7 +6,7 @@
 use super::client::HandleStore;
 
 /// Declare an associated item of one of the traits below, optionally
-/// adjusting it (i.e. adding bounds to types and default bodies to methods).
+/// adjusting it (i.e., adding bounds to types and default bodies to methods).
 macro_rules! associated_item {
     (type TokenStream) =>
         (type TokenStream: 'static + Clone;);
@@ -141,7 +131,7 @@ fn run_bridge_and_client<D: Copy + Send + 'static>(
         &self,
         dispatcher: &mut impl DispatcherTrait,
         input: Buffer<u8>,
-        run_client: extern "C" fn(Bridge, D) -> Buffer<u8>,
+        run_client: extern "C" fn(Bridge<'_>, D) -> Buffer<u8>,
         client_data: D,
     ) -> Buffer<u8>;
 }
@@ -153,7 +143,7 @@ fn run_bridge_and_client<D: Copy + Send + 'static>(
         &self,
         dispatcher: &mut impl DispatcherTrait,
         input: Buffer<u8>,
-        run_client: extern "C" fn(Bridge, D) -> Buffer<u8>,
+        run_client: extern "C" fn(Bridge<'_>, D) -> Buffer<u8>,
         client_data: D,
     ) -> Buffer<u8> {
         let mut dispatch = |b| dispatcher.dispatch(b);
@@ -178,7 +168,7 @@ fn run_bridge_and_client<D: Copy + Send + 'static>(
         &self,
         dispatcher: &mut impl DispatcherTrait,
         input: Buffer<u8>,
-        run_client: extern "C" fn(Bridge, D) -> Buffer<u8>,
+        run_client: extern "C" fn(Bridge<'_>, D) -> Buffer<u8>,
         client_data: D,
     ) -> Buffer<u8> {
         use std::sync::mpsc::channel;
@@ -216,7 +206,7 @@ fn run_bridge_and_client<D: Copy + Send + 'static>(
         &self,
         dispatcher: &mut impl DispatcherTrait,
         input: Buffer<u8>,
-        run_client: extern "C" fn(Bridge, D) -> Buffer<u8>,
+        run_client: extern "C" fn(Bridge<'_>, D) -> Buffer<u8>,
         client_data: D,
     ) -> Buffer<u8> {
         use std::sync::{Arc, Mutex};
@@ -283,7 +273,7 @@ fn run_server<
     handle_counters: &'static client::HandleCounters,
     server: S,
     input: I,
-    run_client: extern "C" fn(Bridge, D) -> Buffer<u8>,
+    run_client: extern "C" fn(Bridge<'_>, D) -> Buffer<u8>,
     client_data: D,
 ) -> Result<O, PanicMessage> {
     let mut dispatcher = Dispatcher {
@@ -299,7 +289,7 @@ fn run_server<
     Result::decode(&mut &b[..], &mut dispatcher.handle_store)
 }
 
-impl client::Client<fn(::TokenStream) -> ::TokenStream> {
+impl client::Client<fn(crate::TokenStream) -> crate::TokenStream> {
     pub fn run<S: Server>(
         &self,
         strategy: &impl ExecutionStrategy,
@@ -323,7 +313,7 @@ pub fn run<S: Server>(
     }
 }
 
-impl client::Client<fn(::TokenStream, ::TokenStream) -> ::TokenStream> {
+impl client::Client<fn(crate::TokenStream, crate::TokenStream) -> crate::TokenStream> {
     pub fn run<S: Server>(
         &self,
         strategy: &impl ExecutionStrategy,